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.

21 lines
618 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' || tabName === '/favorableArea') {
1 month ago
this.showRight = false;
} else {
this.showRight = true;
}
},
changeShowRight(showVal: boolean) {
this.showRight = showVal;
}
},
});