wangxy hai 3 meses
pai
achega
81df52436e
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  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++;
+		},
+	},
+});