修改技术监督按钮重复点击问题
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user