mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
perf: pinia中所有getters改为官方推荐写法,this改成state可自动推导类型 (#490)
Co-authored-by: 苗大 <caoshengmiao@hypergryph.com>
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user