Showing
1 changed file
with
4 additions
and
2 deletions
| @@ -56,6 +56,7 @@ | @@ -56,6 +56,7 @@ | ||
| 56 | const getTitle = computed(() => (!unref(isUpdate) ? '新增告警配置' : '编辑告警配置')); | 56 | const getTitle = computed(() => (!unref(isUpdate) ? '新增告警配置' : '编辑告警配置')); |
| 57 | 57 | ||
| 58 | async function handleSubmit() { | 58 | async function handleSubmit() { |
| 59 | + setDrawerProps({ confirmLoading: true }); | ||
| 59 | try { | 60 | try { |
| 60 | const { createMessage } = useMessage(); | 61 | const { createMessage } = useMessage(); |
| 61 | const values = await validate(); | 62 | const values = await validate(); |
| @@ -77,7 +78,6 @@ | @@ -77,7 +78,6 @@ | ||
| 77 | if (!unref(isUpdate)) { | 78 | if (!unref(isUpdate)) { |
| 78 | delete allData.id; | 79 | delete allData.id; |
| 79 | } | 80 | } |
| 80 | - setDrawerProps({ confirmLoading: true }); | ||
| 81 | let saveMessage = '添加成功'; | 81 | let saveMessage = '添加成功'; |
| 82 | let updateMessage = '修改成功'; | 82 | let updateMessage = '修改成功'; |
| 83 | await saveOrEditAlarmConfig(allData); | 83 | await saveOrEditAlarmConfig(allData); |
| @@ -85,7 +85,9 @@ | @@ -85,7 +85,9 @@ | ||
| 85 | emit('success'); | 85 | emit('success'); |
| 86 | createMessage.success(unref(isUpdate) ? updateMessage : saveMessage); | 86 | createMessage.success(unref(isUpdate) ? updateMessage : saveMessage); |
| 87 | } finally { | 87 | } finally { |
| 88 | - setDrawerProps({ confirmLoading: false }); | 88 | + setTimeout(() => { |
| 89 | + setDrawerProps({ confirmLoading: false }); | ||
| 90 | + }, 300); | ||
| 89 | } | 91 | } |
| 90 | } | 92 | } |
| 91 | 93 |