合并pig-ui avue分支

This commit is contained in:
smallwei 2018-04-20 16:25:44 +08:00
parent acc50f7aaa
commit f06de654e0
4 changed files with 47 additions and 5 deletions

View File

@ -5,7 +5,7 @@
<sidebar class="left pull-chheight"></sidebar>
<div class="right">
<tags ref="nav" class="nav"></tags>
<router-view class="main"></router-view>
<router-view class="main pull-chheight"></router-view>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
<template>
<div class="menu-wrapper">
<template v-for="(item,index) in menu">
<el-menu-item v-if="item.children.length===0 " :index="filterPath(item.href,index)" @click="open(item)" :key="item.label">
<el-menu-item v-if="item.children.length===0 " :index="filterPath(item.path,index)" @click="open(item)" :key="item.label">
<i :class="item.icon"></i>
<span slot="title">{{item.label}}</span>
</el-menu-item>
@ -11,7 +11,7 @@
<span slot="title" :class="{display:!show}">{{item.label}}</span>
</template>
<template v-for="(child,cindex) in item.children">
<el-menu-item :index="filterPath(child.href,cindex)" @click="open(child)" v-if="child.children.length==0" :key="cindex">
<el-menu-item :index="filterPath(child.path,cindex)" @click="open(child)" v-if="child.children.length==0" :key="cindex">
<i :class="child.icon"></i>
<span slot="title">{{child.label}}</span>
</el-menu-item>
@ -44,7 +44,7 @@ export default {
},
open(item) {
this.$router.push({
path: resolveUrlPath(item.href, item.label),
path: resolveUrlPath(item.path, item.name),
query: item.query
});
}

View File

@ -182,3 +182,32 @@ table {
.text-white{
color: #fff;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
//main-container全局样式
.app-main{
min-height: 100%
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
.app-container {
padding: 20px;
box-sizing: border-box;
}

View File

@ -110,6 +110,7 @@ import {
fetchDeptTree
} from "@/api/role";
import { fetchTree } from "@/api/menu";
import { mapGetters } from "vuex";
import waves from "@/directive/waves/index.js"; //
export default {
@ -194,11 +195,23 @@ export default {
create: "创建",
permission: "分配权限"
},
tableKey: 0
tableKey: 0,
tableKey: 0,
roleManager_btn_add: false,
roleManager_btn_edit: false,
roleManager_btn_del: false,
roleManager_btn_perm: false
};
},
created() {
this.getList();
this.roleManager_btn_add = this.permissions["sys_role_add"];
this.roleManager_btn_edit = this.permissions["sys_role_edit"];
this.roleManager_btn_del = this.permissions["sys_role_del"];
this.roleManager_btn_perm = this.permissions["sys_role_perm"];
},
computed: {
...mapGetters(["elements", "permissions"])
},
methods: {
getList() {