Files
tools-web/src/store/modules/component.ts
T
2024-02-19 11:19:26 +08:00

22 lines
493 B
TypeScript

import { defineStore } from 'pinia'
export const useComponentStore = defineStore('component', {
//用来存放变量
state: () => ({
leftCom: false,
leftComDrawer: false,
}),
//方法
actions: {
//设置左侧组件状态
setLeftComStatus(status: boolean) {
console.log(1)
this.leftCom = status
},
//设置左侧组件状态(小屏)
setleftComDrawerStatus(status: boolean) {
console.log(2)
this.leftComDrawer = status
}
}
})