修改技术监督按钮重复点击问题

This commit is contained in:
GGJ
2024-10-17 13:29:51 +08:00
parent e470554b7c
commit 96ea25d0a6
6 changed files with 57 additions and 58 deletions

View File

@@ -17,7 +17,7 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
<el-button type="primary" @click="submit" :loading="loading">确认</el-button>
</span>
</template>
</el-dialog>
@@ -42,6 +42,7 @@ const form = reactive<anyObj>({
url: ''
})
const urlList: any = ref([])
const loading=ref(false)
const defaultProps = {
children: 'children',
label: 'name',
@@ -86,6 +87,7 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
const submit = () => {
loading.value = true
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (urlList.value.length > 0) {
@@ -138,6 +140,9 @@ const submit = () => {
}, 100)
}
})
setTimeout(() => {
loading.value = false
}, 1000)
}
const handleClose = () => {
urlList.value = []