From cadf24e28ba9e269f89a5a5f9468e383004fe73b Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期三, 03 三月 2021 20:32:13 +0800 Subject: [PATCH] 优化请求loading判断 --- src/pages/demo/index.vue | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index 860d081..4491e16 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -67,7 +67,7 @@ </el-table> <!-- 鏂板&缂栬緫 --> - <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'鏂板鍖婚櫌绉戝':'缂栬緫鍖婚櫌绉戝'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog"> + <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'鏂板鍖婚櫌绉戝':'缂栬緫鍖婚櫌绉戝'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog" :close-on-click-modal="false"> <el-form ref="refDialog" :model="dialogData" label-width="110px" :rules="rules" size="small"> <el-form-item label="鍚嶇О" prop="name"> <el-input v-model="dialogData.name" placeholder="璇疯緭鍏ュ悕绉�" maxlength="50" /> @@ -220,6 +220,9 @@ } }, () => { this.$messageSuc(text + '鎴愬姛') + }, (res) => { + item.isUp = item.isUp === 1 ? 0 : 1 + this.$messageError(res.msg) }) }).catch(() => { item.isUp = item.isUp === 1 ? 0 : 1 -- Gitblit v1.8.0