添加页面组件、添加页面组件接口、添加pinia

This commit is contained in:
lhj
2024-10-02 17:05:46 +08:00
parent 079d58048a
commit 0299f6a55b
17 changed files with 199 additions and 1454 deletions

View File

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