|
|
@@ -34,9 +34,10 @@
|
|
|
<PrimaryButton
|
|
|
text="提交"
|
|
|
width="560rpx"
|
|
|
+ :loading="loading"
|
|
|
@click="debounceSubmit.executeWithDelay()"
|
|
|
/>
|
|
|
- <Button v-if="querys.id > 0" type="text" textColor="danger" :loading="loading" @click="deleteInfo">删除</Button>
|
|
|
+ <Button v-if="querys.id > 0 && !loading" type="text" textColor="danger" :loading="deleteing" @click="deleteInfo">删除</Button>
|
|
|
</FlexCol>
|
|
|
</FlexCol>
|
|
|
<XBarSpace />
|
|
|
@@ -69,6 +70,7 @@ import BackgroundBox from '@/components/display/block/BackgroundBox.vue';
|
|
|
import PrimaryButton from '@/common/components/PrimaryButton.vue';
|
|
|
|
|
|
const loading = ref(false);
|
|
|
+const deleteing = ref(false);
|
|
|
const subTitle = ref('');
|
|
|
|
|
|
const formRef = ref<IDynamicFormRef>();
|
|
|
@@ -237,7 +239,7 @@ async function deleteInfo() {
|
|
|
});
|
|
|
if (!res)
|
|
|
return;
|
|
|
- loading.value = true;
|
|
|
+ deleteing.value = true;
|
|
|
try {
|
|
|
await waitTimeOut(800);
|
|
|
await VillageInfoApi.deleteInfo(querys.value.id);
|
|
|
@@ -246,7 +248,7 @@ async function deleteInfo() {
|
|
|
} catch (e) {
|
|
|
showError(e);
|
|
|
} finally {
|
|
|
- loading.value = false;
|
|
|
+ deleteing.value = false;
|
|
|
}
|
|
|
}
|
|
|
const localSavedState = ref(false);
|