Commit 79bea397 authored by yanglilong's avatar yanglilong

Merge branch 'yanglilong' of git.ssish.com:sunhailiang/bims into test

parents 379858e9 e05b7274
......@@ -32,8 +32,8 @@ export default {
created() {},
mounted() {},
methods: {
clickEvent() {
this.$emit("click");
clickEvent(e) {
this.$emit("click", e);
},
},
};
......
......@@ -44,6 +44,7 @@ export default {
loginOut() {
this.$apis.LOGINOUT().then((res) => {
if (res.returnCode) {
this.$store.commit("common/setMenuStack", []);
this.$router.push("/login");
} else {
this.$message.error(res.returnMsg || "退出失败");
......
......@@ -8,8 +8,8 @@
:to="item.path"
>
{{ item.title }}
<Icon
@click="closeMenu(index)"
<Icon v-if="menuStack.length>1"
@click="(e)=>closeMenu(e, index)"
:name="isVisit(item.path) ? 'ssiclose_active' : 'ssiclose'"
:size="16"
/>
......@@ -31,7 +31,8 @@ export default {
const path = this.$route.path;
return path === val;
},
closeMenu(index) {
closeMenu(e, index) {
e.stopPropagation();
const menuStack = JSON.parse(JSON.stringify(this.menuStack));
const isVisit = this.isVisit(menuStack[index].path);
menuStack.splice(index, 1);
......
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