【初始化】前端工程项目

This commit is contained in:
chudong
2025-05-09 15:11:21 +08:00
parent c012704c9a
commit d7c556c3b0
524 changed files with 55595 additions and 112 deletions

View File

@@ -0,0 +1,15 @@
import { StoreDefinition, storeToRefs } from 'pinia'
/**
* 使用pinia store
* @param store
* @returns
*/
export function usePiniaStore<T extends StoreDefinition>(store: T) {
const storeVal = store()
const storeRef = storeToRefs(storeVal)
return {
...storeVal,
...storeRef,
}
}