xq feat:"修改了数据接入"
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
:active-text-color="theme"
|
||||
:collapse-transition="false"
|
||||
mode="vertical"
|
||||
v-if="showSide"
|
||||
>
|
||||
<sidebar-item v-for="(r, index) in sidebarRouters" :key="r.path + index" :item="r" :base-path="r.path" />
|
||||
</el-menu>
|
||||
@ -28,6 +29,7 @@ import { useAppStore } from '@/store/modules/app';
|
||||
import { useSettingsStore } from '@/store/modules/settings';
|
||||
import { usePermissionStore } from '@/store/modules/permission';
|
||||
import { RouteRecordRaw } from 'vue-router';
|
||||
import { useProgram } from '@/store/modules/program';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
@ -41,6 +43,26 @@ const sideTheme = computed(() => settingsStore.sideTheme);
|
||||
const theme = computed(() => settingsStore.theme);
|
||||
const isCollapse = computed(() => !appStore.sidebar.opened);
|
||||
|
||||
const programState = useProgram();
|
||||
const programID = computed(() => {
|
||||
return programState.programID;
|
||||
});
|
||||
|
||||
const showSide = ref(true);
|
||||
|
||||
watch(
|
||||
programID,
|
||||
(nv, ov) => {
|
||||
if (nv !== ov) {
|
||||
showSide.value = false;
|
||||
setTimeout(() => {
|
||||
showSide.value = true;
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const activeMenu = computed(() => {
|
||||
const { meta, path } = route;
|
||||
// if set path, the sidebar will highlight the path you set
|
||||
|
Reference in New Issue
Block a user