Commit edb1616b by 无尘

fix: 删除打印

parent f343ba10
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,7 +2,7 @@
"name": "@gic-test/vue-office-aside",
"description": "vue-office-aside Plugin",
"author": "fairyly <498745097@qq.com>",
"version": "1.0.26",
"version": "1.0.31",
"license": "MIT",
"private": false,
"main": "dist/vue-office-aside.js",
......
......@@ -64,9 +64,8 @@
},
handleSelect(key, keyPath){
const that = this
console.log(key, keyPath);
that.selectMenu = key
const that = this;
that.selectMenu = key;
},
// 设置新数据
......@@ -98,12 +97,19 @@
const that = this;
data.forEach(function(ele,index){
if (('/' + that.pathName) == ele.url) {
that.selectMenu = '/' + that.pathName
that.selectMenu = '/' + that.pathName;
}else {
ele.children.forEach(function(el,key){
if (('/' + that.pathName) == el.url) {
that.selectMenu = !!el.display? el.url : ele.url;
}
if (!!el.children.length) {
el.children.forEach(function(item,k){
if (item.url == that.pathName) {
that.selectMenu = el.url;
}
})
}
})
}
})
......@@ -117,17 +123,17 @@
// 刷新路由
refreshRoute() {
const that = this
const that = this;
//获取项目名 pathname (路由的hash)
that.routePathName = window.location.hash.split('/')[1];
if (that.routePathName.indexOf('?')!= -1) {
that.routePathName = that.routePathName.split('?')[0]
that.routePathName = that.routePathName.split('?')[0];
}
if (that.routePathName.indexOf('/')!= -1) {
that.routePathName = that.routePathName.split('/')[0]
that.routePathName = that.routePathName.split('/')[0];
}
that.pathName = that.routePathName
that.getLeftMenu()
that.pathName = that.routePathName;
that.getLeftMenu();
},
/**
......@@ -141,12 +147,12 @@
if(branchArr.length>0){
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}else {
father.children = []
father.children = [];
}
return father.level == 1; //返回第一层
});
tree.sort(function(a,b){
return a.sort - b.sort
return a.sort - b.sort;
});
return tree;
},
......@@ -172,7 +178,7 @@
})
return;
}
that.setNewData(that.treeData(resData.result.leftMenu))
that.setNewData(that.treeData(resData.result.leftMenu));
return;
}
that.$message.error({
......@@ -217,7 +223,7 @@
//获取项目名 pathname (路由的hash)
that.pathName = window.location.hash.split('/')[1];
if (that.pathName.indexOf('?')!= -1) {
that.pathName = that.pathName.split('?')[0]
that.pathName = that.pathName.split('?')[0];
}
// 获取菜单
that.getLeftMenu();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment