|
@@ -6,11 +6,9 @@
|
|
|
<el-col :span="24" class="one">
|
|
|
<el-menu
|
|
|
class="sidebar-el-menu"
|
|
|
- :default-active="active"
|
|
|
+ :default-active="onRoutes"
|
|
|
unique-opened
|
|
|
- default-openeds
|
|
|
router
|
|
|
- :collapse="collapse"
|
|
|
:background-color="styleInfo.backColor"
|
|
|
:text-color="styleInfo.textColor"
|
|
|
:active-text-color="styleInfo.activeColor"
|
|
@@ -66,19 +64,13 @@ import { useRoute } from 'vue-router'
|
|
|
// import { RoleStore } from '@common/src/stores/admin/role' //模块
|
|
|
// import type { IQueryResult } from '@/util/types.util'
|
|
|
// const role = RoleStore()
|
|
|
-const useRoutes = useRoute()
|
|
|
+const route = useRoute()
|
|
|
+let onRoutes = route.path
|
|
|
let user: Ref<any> = ref(store.state.user)
|
|
|
const styleInfo: Ref<any> = ref(menuInfo.info)
|
|
|
let collapse: Ref<any> = ref(false)
|
|
|
let items: Ref<any> = ref(admin)
|
|
|
-// 选中
|
|
|
-const active: Ref<any> = ref('')
|
|
|
-onMounted(async () => {
|
|
|
- onRoutes()
|
|
|
-})
|
|
|
-const onRoutes = () => {
|
|
|
- active.value = useRoutes.path
|
|
|
-}
|
|
|
+onMounted(async () => {})
|
|
|
|
|
|
const getMenu = async () => {}
|
|
|
|