This commit is contained in:
shijing 2023-02-03 14:20:44 +08:00
parent facd1c081c
commit e28f557d45
3 changed files with 24 additions and 7 deletions

View File

@ -66,6 +66,7 @@
"vue/multi-word-component-names": 0,
"no-debugger": "off",
"no-console": "off",
"drop_debugger":true,
"no-trailing-spaces": "off"
}
},

View File

@ -27,6 +27,18 @@
// ]
const routes = [
{
"path": "/bigScreen",
"name": "bigScreen",
"meta": {
"title": "驾驶舱",
"icon": "el-icon-position",
"perms": ["bigScreen"],
"fullpage": true,
"type": "link",
},
"component": "bigScreen"
},
{
"name": "home",
"path": "/home",
@ -50,12 +62,13 @@ const routes = [
},
{
"path": "/bigScreen",
"name": "bigScreens",
"name": "bigScreen",
"meta": {
"title": "bigScreens",
"title": "驾驶舱",
"icon": "el-icon-position",
"perms": ["bigScreen"],
"fullpage": true,
"type": "link",
},
"component": "bigScreen"
},

View File

@ -12,6 +12,7 @@
</el-menu-item>
<el-sub-menu v-else :index="navMenu.path">
<template #title>
<a v-if="navMenu.meta.type=='link'" href="javascript:void(0)" @click="blankPageClick(navMenu.path)"></a>
<el-icon v-if="navMenu.meta&&navMenu.meta.icon"><component :is="navMenu.meta.icon || 'el-icon-menu'"/></el-icon>
<span>{{navMenu.meta.title}}</span>
</template>
@ -30,14 +31,16 @@
},
methods: {
hasChildren(item) {
console.log(item)
console.log(item.children && !item.children.every(item => item.meta.hidden))
return item.children && !item.children.every(item => item.meta.hidden)
},
blankPageClick(path){
console.log(window.location);
console.log(path);
let linkUrl = window.location.origin+"/#"+path;
console.log(linkUrl)
debugger;
// console.log(window.location);
// console.log(path);
// let linkUrl = window.location.origin+"/#"+path;
// console.log(linkUrl)
// debugger;
let routeUrl = this.$router.resolve({path: path});