From e3cbf4ad90130ba3637f267bad0058d2824b2a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E8=A3=A4=E8=A1=A9?= Date: Mon, 30 Sep 2019 16:38:18 +0800 Subject: [PATCH] fix[example]: fixed create.vue cache error https://github.com/PanJiaChen/vue-element-admin/issues/2608 --- src/views/example/components/ArticleDetail.vue | 2 -- src/views/example/create.vue | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/example/components/ArticleDetail.vue b/src/views/example/components/ArticleDetail.vue index ef0f1df9..8aa97339 100644 --- a/src/views/example/components/ArticleDetail.vue +++ b/src/views/example/components/ArticleDetail.vue @@ -170,8 +170,6 @@ export default { if (this.isEdit) { const id = this.$route.params && this.$route.params.id this.fetchData(id) - } else { - this.postForm = Object.assign({}, defaultForm) } // Why need to make a copy of this.$route here? diff --git a/src/views/example/create.vue b/src/views/example/create.vue index 4d3a24b5..f28ce287 100644 --- a/src/views/example/create.vue +++ b/src/views/example/create.vue @@ -6,7 +6,7 @@ import ArticleDetail from './components/ArticleDetail' export default { - name: 'CreateForm', + name: 'CreateArticle', components: { ArticleDetail } }