耐受图调整、屏蔽非必要的菜单、登录后跳转到变频器页面
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { HOME_URL } from '@/config'
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import { useTabsStore } from '@/stores/modules/tabs'
|
||||
@@ -74,8 +75,8 @@ const handelOpen = async (item: string, key: string) => {
|
||||
await initDynamicRouter()
|
||||
|
||||
// 只有当目标路径与当前路径不同时才跳转
|
||||
if (router.currentRoute.value.path !== '/home/index') {
|
||||
await router.push({ path: '/home/index' })
|
||||
if (router.currentRoute.value.path !== HOME_URL) {
|
||||
await router.push({ path: HOME_URL })
|
||||
} else {
|
||||
// 如果已在目标页面,手动触发组件更新
|
||||
window.location.reload() // 或者采用其他方式刷新数据
|
||||
|
||||
Reference in New Issue
Block a user