From 212012dc6266d3b340316d803cf9ee69f3ec5c0d Mon Sep 17 00:00:00 2001 From: FlyFive <826323891@qq.com> Date: 星期一, 02 十一月 2020 11:49:25 +0800 Subject: [PATCH] 未选择时,点击“确认”,出现必填验证提示。使用blur的话,选择之后验证消息不会自动消失,使用change会自动消失。 --- ruoyi-ui/src/views/system/notice/index.vue | 24 ++++++++++-------------- 1 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 078d94a..44bd5ed 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -159,12 +159,12 @@ </el-col> <el-col :span="24"> <el-form-item label="鍐呭"> - <Editor v-model="form.noticeContent" /> + <editor v-model="form.noticeContent" :min-height="192"/> </el-form-item> </el-col> </el-row> </el-form> - <div slot="footer" class="dialog-footer" style="padding-top:30px"> + <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> <el-button @click="cancel">鍙� 娑�</el-button> </div> @@ -221,7 +221,7 @@ { required: true, message: "鍏憡鏍囬涓嶈兘涓虹┖", trigger: "blur" } ], noticeType: [ - { required: true, message: "鍏憡绫诲瀷涓嶈兘涓虹┖", trigger: "blur" } + { required: true, message: "鍏憡绫诲瀷涓嶈兘涓虹┖", trigger: "change" } ] } }; @@ -307,19 +307,15 @@ if (valid) { if (this.form.noticeId != undefined) { updateNotice(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - } + this.msgSuccess("淇敼鎴愬姛"); + this.open = false; + this.getList(); }); } else { addNotice(this.form).then(response => { - if (response.code === 200) { - this.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - } + this.msgSuccess("鏂板鎴愬姛"); + this.open = false; + this.getList(); }); } } @@ -337,7 +333,7 @@ }).then(() => { this.getList(); this.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(function() {}); + }) } } }; -- Gitblit v1.9.3