wangxy 3 ヶ月 前
コミット
81df52436e
1 ファイル変更12 行追加0 行削除
  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++;
+		},
+	},
+});