create project

This commit is contained in:
Captain.B 2020-02-26 18:58:22 +08:00
parent be37974388
commit 14e5c8f08c
3 changed files with 16 additions and 0 deletions

View File

@ -13,6 +13,9 @@
<font-awesome-icon :icon="['fa', 'list-ul']"/> <font-awesome-icon :icon="['fa', 'list-ul']"/>
<span style="padding-left: 5px;">显示全部</span> <span style="padding-left: 5px;">显示全部</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/project" :route="{name:'project', query:{isCreate:true}}">
<el-button type="text">创建项目</el-button>
</el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="4" popper-class="submenu" v-permission="['test_manager', 'test_user']"> <el-submenu index="4" popper-class="submenu" v-permission="['test_manager', 'test_user']">
<template slot="title">测试</template> <template slot="title">测试</template>

View File

@ -87,7 +87,19 @@
}, },
} }
}, },
watch: {
'$route'(to) {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
}
},
mounted() { mounted() {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
this.list(); this.list();
}, },
destroyed() { destroyed() {

View File

@ -93,6 +93,7 @@ const router = new VueRouter({
}, },
{ {
path: "/project", path: "/project",
name: 'project',
components: { components: {
content: MsProject content: MsProject
} }