接口获取动态菜单

This commit is contained in:
2026-04-22 14:02:04 +08:00
parent 98ad5d16f4
commit 19a76015bd
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
# 开发环境标识Vite 内置变量,无需修改)
NODE_ENV = development
# 开发环境接口基础地址(对应你配置的 192.168.10.10:8085/api
VITE_API_BASE_URL = http://192.168.10.10:8085/api
# 开发环境接口基础地址(192.168.11.183:8085/api
VITE_API_BASE_URL = http://192.168.11.183:8085/api
# 请求超时时间(毫秒)
VITE_REQUEST_TIMEOUT = 10000

View File

@ -9,7 +9,7 @@
<!-- 菜单区域 -->
<el-menu class="menu" :unique-opened="true" :default-active="activeMenu" router>
<template v-for="menu in staticMenuList" :key="menu.id">
<template v-for="menu in menuList" :key="menu.id">
<!-- 无子菜单 -->
<el-menu-item v-if="!menu.children || menu.children.length === 0" :index="menu.path">
<el-icon>
@ -50,7 +50,7 @@ const menuList = ref<any[]>([])
// index fullPath
const activeMenu = computed(() => {
return route.fullPath // 使 path
return route.fullPath // 使 path
})
//
onMounted(async () => {