daidaibg
2022-10-10 a44105de2e57b676280f175237e3f2e2c017db6a
1
2
3
4
5
6
7
8
9
10
import { defineStore } from "pinia";
 
export const counter = defineStore("counter", () => {
  const count = ref<number>(1);
  function increment() {
    count.value++;
  }
 
  return { count, increment };
});