From d571715c3d943f40af5139c825202b45a9e87ccf 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 3ab0daec..616fd42b 100644 --- a/src/views/example/components/ArticleDetail.vue +++ b/src/views/example/components/ArticleDetail.vue @@ -172,8 +172,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 } }