From 827ba50c0480c1458a9654741fcb64af66050eb4 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 15 May 2024 15:22:49 +0800
Subject: [PATCH] 保存按钮点击后禁用,防止重复提交
---
src/views/place/components/baseAllInfo.vue | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/views/place/components/baseAllInfo.vue b/src/views/place/components/baseAllInfo.vue
index 9baf10c..d396de0 100644
--- a/src/views/place/components/baseAllInfo.vue
+++ b/src/views/place/components/baseAllInfo.vue
@@ -30,7 +30,7 @@
</div>
<div class="footer-btn-box">
- <el-button size="small" type="primary" @click="dataUpdate">保 存</el-button>
+ <el-button size="small" :disabled="disabled" type="primary" @click="dataUpdate">保 存</el-button>
<el-button size="small" @click="roleBoxClose">关 闭</el-button>
</div>
@@ -72,6 +72,7 @@
}
return {
+ disabled: false,
roleBox: false,
baseShow: false,
restShow: false,
@@ -82,7 +83,7 @@
option: {
submitBtn: false,
emptyBtn: false,
-
+ dialogMenuPosition: 'right',
column: [{
span: 12,
label: "场所名称",
@@ -1045,7 +1046,7 @@
dataUpdate() {
const that = this
-
+ that.disabled = true;
let imageUrls = this.desposeImage(this.form.imageUrls)
let placeImages = this.desposeImage(this.placeForm.imageUrls)
let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
@@ -1106,7 +1107,7 @@
roleBoxClose() {
this.form = {}
this.placeForm = {}
-
+ this.disabled = false
this.$refs.baseForm && this.$refs.baseForm.resetForm()
this.$refs.restForm && this.$refs.restForm.resetForm()
this.baseShow = false
@@ -1161,4 +1162,4 @@
justify-content: center;
}
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3