From d27a44d4463a6765dfe5554724ccdaa3b9b75594 Mon Sep 17 00:00:00 2001 From: Double-_-Z <2492419643@qq.com> Date: Sun, 13 Jul 2025 20:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=BC=96=E8=BE=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9D=83=E9=99=90=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/platform/article/add.vue | 8 +++++--- src/views/platform/article/index.vue | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/platform/article/add.vue b/src/views/platform/article/add.vue index 3e3bfb1..84f3869 100644 --- a/src/views/platform/article/add.vue +++ b/src/views/platform/article/add.vue @@ -65,7 +65,8 @@ 取消 - + 保存 @@ -103,6 +104,7 @@ export default { } return { loading: false, + isAdd: this.$route.path==='/platform/article/add', form:{ labelName: '', moduleName: '', @@ -141,7 +143,7 @@ export default { }, created(){ const { moduleName, labelName, id } = this.$route.query; - if(moduleName && labelName && this.$route.path == '/platform/article/edit') { + if(moduleName && labelName && !this.isAdd) { this.getArticleDetailById(id); } }, @@ -236,7 +238,7 @@ export default { if (valid) { // let res = await this.$http.post('/api/article/add', this.articleForm); // if(res.code == 200){ - this.$message.success('文章添加成功!'); + this.$message.success(`文章${this.isAdd?'添加':'编辑'}成功!`); this.cancel(); // } }else{ diff --git a/src/views/platform/article/index.vue b/src/views/platform/article/index.vue index f4b43cb..a7ca0b1 100644 --- a/src/views/platform/article/index.vue +++ b/src/views/platform/article/index.vue @@ -16,7 +16,7 @@ class="filter-item" @keyup.enter.native="crud.toQuery"/> + icon="el-icon-plus" @click="toAddArticle" v-if="checkPer(permission.add)"> 新增{{ crud.title }} @@ -44,8 +44,8 @@