You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
666 B
TypeScript

1 month ago
import { defineStore } from 'pinia'
export const useCurrentTabStore = defineStore('currentTab', {
state: () => ({
currentTab: null as string | null,
showRight: true
}),
actions: {
changeTab(tabName: string) {
this.currentTab = tabName;
1 month ago
if (tabName === '/drawParamGdi' || tabName === '/drawview') {
1 month ago
this.showRight = false;
} else {
this.showRight = true;
}
1 month ago
console.log('当前页参数:', this.currentTab, this.showRight);
1 month ago
},
changeShowRight(showVal: boolean) {
this.showRight = showVal;
}
},
});