NavigationTabs导航页签组件
基础用法
vue
<template>
<div class="container">
<div class="navigation-warp">
<ws-navigation-tabs :menuData="routerData"></ws-navigation-tabs>
</div>
<div class="main-container">
<!-- 增加keep-alive缓存机制 -->
<ws-keep-alive>
<router-view class="main-router-view"></router-view>
</ws-keep-alive>
</div>
<ws-navigation-menu :visible.sync="visible" :routerData.sync="routerData" :menuData="menuList"></ws-navigation-menu>
</div>
</template>
<script>
export default {
data () {
return {
visible: false,
routerData: [],
}
},
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
属性
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
menuData | 菜单列表,必传参数 | Array | - |
click | tab点击事件 | Function | - |
close | 关闭页签,返回false可阻止页签关闭 | Function | - |
open | 新开页签事件 | Function | - |
方法
方法名 | 说明 |
---|---|
$getModuleUrl | 绑定到Vue.prototype上,根据模块名和op值查询对应模块的请求地址及权限,参数{moduleName,op} |
$getModuleOpList | 绑定到Vue.prototype上,根据模块名查询当前模块所有配置的op,参数{moduleName} |