|
@@ -1,14 +1,18 @@
|
|
<template>
|
|
<template>
|
|
<div id="menus">
|
|
<div id="menus">
|
|
<el-menu :default-active="activeMenu" active-text-color="#850000" :router="true">
|
|
<el-menu :default-active="activeMenu" active-text-color="#850000" :router="true">
|
|
- <el-menu-item
|
|
|
|
- v-for="(item, index) in list"
|
|
|
|
- :key="index"
|
|
|
|
- :index="item.path"
|
|
|
|
- :style="`${activeMenu === item.path ? 'border-left:2px solid #850000;color:#850000' : ''}`"
|
|
|
|
- >
|
|
|
|
- <span slot="title">{{ item.title }}</span>
|
|
|
|
- </el-menu-item>
|
|
|
|
|
|
+ <template v-for="(item, index) in list">
|
|
|
|
+ <el-menu-item
|
|
|
|
+ v-if="item.type === 'column'"
|
|
|
|
+ :key="index"
|
|
|
|
+ :index="item.path"
|
|
|
|
+ :style="`${activeMenu === item.path ? 'border-left:2px solid #850000;color:#850000' : ''}`"
|
|
|
|
+ >
|
|
|
|
+ <span slot="title">{{ item.title }} </span>
|
|
|
|
+ </el-menu-item>
|
|
|
|
+ <el-menu-item v-else-if="item.type === 'content'" :index="item.path" :key="index">{{ item.title }}</el-menu-item>
|
|
|
|
+ <el-menu-item v-else index="" :key="index" @click="turnTo(item.url)">{{ item.title }}</el-menu-item>
|
|
|
|
+ </template>
|
|
</el-menu>
|
|
</el-menu>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -84,6 +88,9 @@ export default {
|
|
this.$set(this, `activeMenu`, path);
|
|
this.$set(this, `activeMenu`, path);
|
|
return path;
|
|
return path;
|
|
},
|
|
},
|
|
|
|
+ turnTo(url) {
|
|
|
|
+ window.open(url);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|