perf: pinia中所有getters改为官方推荐写法,this改成state可自动推导类型 (#490)

Co-authored-by: 苗大 <caoshengmiao@hypergryph.com>
This commit is contained in:
Wit〆苗大
2023-03-28 16:25:56 +08:00
committed by GitHub
parent 990caef48d
commit bff68c3e7b
4 changed files with 17 additions and 17 deletions

View File

@@ -23,11 +23,11 @@ export const useAppStore = defineStore({
sortSwap: false
}),
getters: {
getSidebarStatus() {
return this.sidebar.opened;
getSidebarStatus(state) {
return state.sidebar.opened;
},
getDevice() {
return this.device;
getDevice(state) {
return state.device;
}
},
actions: {