c1b532ad
梁保满
权限配置,路由基础设置
|
1
|
<template>
|
82b9014a
梁保满
交互调整
|
2
3
4
5
6
7
8
9
|
<div>
<template v-for="child in menuData">
<el-submenu
v-if="child.children.length > 0"
:index="child.path"
:key="child.path"
>
<template slot="title">
|
f45b3c05
LH_PC
云平台新UI界面
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<i
v-if="child.iconCls"
:class="child.iconCls ? child.iconCls : [fa, fa - file]"
/>
<template v-else-if="child.iconImage">
<el-image
v-show="$route.path == child.path"
:src="child.selectedIconImage"
></el-image>
<el-image
v-show="$route.path != child.path"
:src="child.iconImage"
></el-image>
</template>
|
82b9014a
梁保满
交互调整
|
24
25
26
27
|
<span slot="title">{{ child.name }}</span>
</template>
<menu-tree :menuData="child.children" />
</el-submenu>
|
82b9014a
梁保满
交互调整
|
28
29
30
31
|
<el-menu-item
v-else-if="!child.hidden"
:index="child.path"
:key="child.path"
|
f45b3c05
LH_PC
云平台新UI界面
|
32
|
:class="path.includes(child.path) ? 'is-active' : ''"
|
82b9014a
梁保满
交互调整
|
33
|
>
|
f45b3c05
LH_PC
云平台新UI界面
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<i
v-if="child.iconCls"
:class="child.iconCls ? child.iconCls : [fa, fa - file]"
/>
<template v-else-if="child.iconImage">
<el-image
v-show="path.includes(child.path)"
:src="child.selectedIconImage"
></el-image>
<el-image
v-show="!path.includes(child.path)"
:src="child.iconImage"
></el-image>
</template>
|
82b9014a
梁保满
交互调整
|
48
49
50
51
|
<span slot="title">{{ child.name }}</span>
</el-menu-item>
</template>
</div>
|
c1b532ad
梁保满
权限配置,路由基础设置
|
52
53
54
55
56
|
</template>
<script>
export default {
name: "menuTree",
|
82b9014a
梁保满
交互调整
|
57
|
props: ["menuData", "path"],
|
f45b3c05
LH_PC
云平台新UI界面
|
58
59
60
61
|
watch: {
// 监听浏览器直接输入路由,将此路由添加到tabnavBox
path: function (val) {},
},
|
82b9014a
梁保满
交互调整
|
62
|
};
|
c1b532ad
梁保满
权限配置,路由基础设置
|
63
64
|
</script>
|
f45b3c05
LH_PC
云平台新UI界面
|
65
|
<style scoped></style>
|