import { defineStore } from 'pinia' import { IPageComponent } from '../type/IPageComponent'; import { ref,computed } from 'vue'; export const useCounterStore = defineStore('counter', () => { const count = ref(0) const scheme=ref() const doubleCount = computed(() => count.value * 2) function increment() { count.value++ } function decrement() { count.value-- } function initScheme(value) { scheme.value=value } return { count,scheme, doubleCount, increment,decrement,initScheme } })