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
21 lines
618 B
TypeScript
import { defineStore } from 'pinia'
|
|
|
|
export const useCurrentTabStore = defineStore('currentTab', {
|
|
state: () => ({
|
|
currentTab: null as string | null,
|
|
showRight: true
|
|
}),
|
|
actions: {
|
|
changeTab(tabName: string) {
|
|
this.currentTab = tabName;
|
|
if (tabName === '/drawParamGdi' || tabName === '/drawview' || tabName === '/favorableArea') {
|
|
this.showRight = false;
|
|
} else {
|
|
this.showRight = true;
|
|
}
|
|
},
|
|
changeShowRight(showVal: boolean) {
|
|
this.showRight = showVal;
|
|
}
|
|
},
|
|
}); |