@neosjs/cli
Version:
Neos(奈欧斯)是一个帮助开发者快速地创建 Vue3 应用并自动配置项目编译的脚手架
25 lines (23 loc) • 474 B
text/typescript
import { defineStore } from 'pinia'
import { store } from '@/stores'
interface IAppInfo {
lastBuildTime: string
}
export const useSystemStore = defineStore({
id: 'systemStore',
state: () => ({
appInfo: {} as IAppInfo
}),
getters: {
getAppInfo: state => state.appInfo
},
actions: {
clearStore() {
this.$reset()
}
},
persist: {
storage: window.sessionStorage
}
})
export const useSystemStoreWithOut = () => useSystemStore(store)