code refactor
This commit is contained in:
@@ -82,8 +82,8 @@ const pushRouter = (tab: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onBeforeRouteUpdate((to) => {
|
onBeforeRouteUpdate((to) => {
|
||||||
if (to.query && to.query.tab && ALL_TABS.indexOf(to.query.tab) >= 0) {
|
if (to.query && to.query['tab'] && ALL_TABS.indexOf(to.query['tab'] as string) >= 0) {
|
||||||
activeTab.value = to.query.tab;
|
activeTab.value = to.query['tab'] as string;
|
||||||
} else {
|
} else {
|
||||||
activeTab.value = 'basicSetting';
|
activeTab.value = 'basicSetting';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ const pushRouter = (tab: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onBeforeRouteUpdate((to) => {
|
onBeforeRouteUpdate((to) => {
|
||||||
if (to.query && to.query.tab && ALL_TABS.indexOf(to.query.tab) >= 0) {
|
if (to.query && to.query['tab'] && ALL_TABS.indexOf(to.query['tab'] as string) >= 0) {
|
||||||
activeTab.value = to.query.tab;
|
activeTab.value = to.query['tab'] as string;
|
||||||
} else {
|
} else {
|
||||||
activeTab.value = 'basicSetting';
|
activeTab.value = 'basicSetting';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user