Showing
1 changed file
with
4 additions
and
2 deletions
| ... | ... | @@ -45,10 +45,10 @@ |
| 45 | 45 | const getTitle = computed(() => (!unref(isUpdate) ? '新增字典配置' : '编辑字典配置')); |
| 46 | 46 | |
| 47 | 47 | async function handleSubmit() { |
| 48 | + setDrawerProps({ confirmLoading: true }); | |
| 48 | 49 | try { |
| 49 | 50 | const values = await validate(); |
| 50 | 51 | const { createMessage } = useMessage(); |
| 51 | - setDrawerProps({ confirmLoading: true }); | |
| 52 | 52 | let successMessage = '添加成功'; |
| 53 | 53 | //如果是修改需要传入id |
| 54 | 54 | if (unref(isUpdate)) { |
| ... | ... | @@ -61,7 +61,9 @@ |
| 61 | 61 | createMessage.success(successMessage); |
| 62 | 62 | }); |
| 63 | 63 | } finally { |
| 64 | - setDrawerProps({ confirmLoading: false }); | |
| 64 | + setTimeout(() => { | |
| 65 | + setDrawerProps({ confirmLoading: false }); | |
| 66 | + }, 300); | |
| 65 | 67 | } |
| 66 | 68 | } |
| 67 | 69 | ... | ... |