diff --git a/packages/3.0.0/AppContentManage/components/List.vue b/packages/3.0.0/AppContentManage/components/List.vue index dd1f54bf..208e82b3 100644 --- a/packages/3.0.0/AppContentManage/components/List.vue +++ b/packages/3.0.0/AppContentManage/components/List.vue @@ -33,13 +33,13 @@ height="580px" title="文章分类" @close="onClose" - @onConfirm="isShowAdd = false"> + @onConfirm="onConfirm(false)">
- 添加 + 添加
@@ -166,7 +166,13 @@ }) }, - onConfirm () { + onConfirm (flag) { + if (!flag && !this.id) { + this.isShowAdd = false + + return false + } + this.$refs.form.validate((valid) => { if (valid) { this.instance.post(`/app/appcontentmodulecategory/addOrUpdate`, { @@ -175,14 +181,14 @@ }).then(res => { if (res.code == 0) { this.$message.success('提交成功') + this.getList() + this.getCateList() if (this.id) { this.id = '' this.form.categoryName = '' return false } - this.getList() - this.getCateList() } }) }