wangxy 3 tháng trước cách đây
mục cha
commit
81df52436e
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      store/counter.js

+ 12 - 0
store/counter.js

@@ -0,0 +1,12 @@
+import { defineStore } from 'pinia';
+
+export const useCounterStore = defineStore('counter', {
+	state: () => {
+		return { count: 0 };
+	},
+	actions: {
+		increment() {
+			this.count++;
+		},
+	},
+});