From 14e5c8f08ca19a7abee09f530f930860b68e65fb Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 26 Feb 2020 18:58:22 +0800 Subject: [PATCH] create project --- frontend/src/performance/components/HeaderMenus.vue | 3 +++ .../src/performance/components/project/MsProject.vue | 12 ++++++++++++ frontend/src/performance/components/router/router.js | 1 + 3 files changed, 16 insertions(+) diff --git a/frontend/src/performance/components/HeaderMenus.vue b/frontend/src/performance/components/HeaderMenus.vue index 5cd1f09d62..28ac7adc15 100644 --- a/frontend/src/performance/components/HeaderMenus.vue +++ b/frontend/src/performance/components/HeaderMenus.vue @@ -13,6 +13,9 @@ 显示全部 + + 创建项目 + diff --git a/frontend/src/performance/components/project/MsProject.vue b/frontend/src/performance/components/project/MsProject.vue index 6f94bf2255..10d92300bc 100644 --- a/frontend/src/performance/components/project/MsProject.vue +++ b/frontend/src/performance/components/project/MsProject.vue @@ -87,7 +87,19 @@ }, } }, + watch: { + '$route'(to) { + let isCreate = this.$route.query.isCreate; + if (isCreate) { + this.createVisible = true; + } + } + }, mounted() { + let isCreate = this.$route.query.isCreate; + if (isCreate) { + this.createVisible = true; + } this.list(); }, destroyed() { diff --git a/frontend/src/performance/components/router/router.js b/frontend/src/performance/components/router/router.js index 22ef26fb81..38badb6a9c 100644 --- a/frontend/src/performance/components/router/router.js +++ b/frontend/src/performance/components/router/router.js @@ -93,6 +93,7 @@ const router = new VueRouter({ }, { path: "/project", + name: 'project', components: { content: MsProject }