perf: 优化动态路由
parent
1452a1afc7
commit
879358821d
@ -1,34 +0,0 @@
|
|||||||
import { defineStore } from 'pinia'
|
|
||||||
import { store } from '../index'
|
|
||||||
|
|
||||||
export interface DictState {
|
|
||||||
isSetDict: boolean
|
|
||||||
dictObj: Recordable
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useDictStore = defineStore('dict', {
|
|
||||||
state: (): DictState => ({
|
|
||||||
isSetDict: false,
|
|
||||||
dictObj: {}
|
|
||||||
}),
|
|
||||||
getters: {
|
|
||||||
getDictObj(): Recordable {
|
|
||||||
return this.dictObj
|
|
||||||
},
|
|
||||||
getIsSetDict(): boolean {
|
|
||||||
return this.isSetDict
|
|
||||||
}
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
setDictObj(dictObj: Recordable) {
|
|
||||||
this.dictObj = dictObj
|
|
||||||
},
|
|
||||||
setIsSetDict(isSetDict: boolean) {
|
|
||||||
this.isSetDict = isSetDict
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export const useDictStoreWithOut = () => {
|
|
||||||
return useDictStore(store)
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue