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++;
+		},
+	},
+});