Showing
1 changed file
with
4 additions
and
2 deletions
@@ -111,6 +111,7 @@ | @@ -111,6 +111,7 @@ | ||
111 | const getTitle = computed(() => (!unref(isUpdate) ? '新增账号' : '编辑账号')); | 111 | const getTitle = computed(() => (!unref(isUpdate) ? '新增账号' : '编辑账号')); |
112 | 112 | ||
113 | async function handleSubmit() { | 113 | async function handleSubmit() { |
114 | + setModalProps({ confirmLoading: true }); | ||
114 | try { | 115 | try { |
115 | const { createMessage } = useMessage(); | 116 | const { createMessage } = useMessage(); |
116 | if (unref(isUpdate)) { | 117 | if (unref(isUpdate)) { |
@@ -133,7 +134,6 @@ | @@ -133,7 +134,6 @@ | ||
133 | typeof values.accountExpireTime != 'undefined' && values.accountExpireTime != null | 134 | typeof values.accountExpireTime != 'undefined' && values.accountExpireTime != null |
134 | ? values.accountExpireTime.format('YYYY-MM-DD HH:mm:ss') | 135 | ? values.accountExpireTime.format('YYYY-MM-DD HH:mm:ss') |
135 | : null; | 136 | : null; |
136 | - setModalProps({ confirmLoading: true }); | ||
137 | Object.assign(postData, values); | 137 | Object.assign(postData, values); |
138 | if (unref(isUpdate)) { | 138 | if (unref(isUpdate)) { |
139 | if (values.email == '') { | 139 | if (values.email == '') { |
@@ -149,7 +149,9 @@ | @@ -149,7 +149,9 @@ | ||
149 | emit('success'); | 149 | emit('success'); |
150 | createMessage.success(unref(isUpdate) ? '编辑成功' : '新增成功'); | 150 | createMessage.success(unref(isUpdate) ? '编辑成功' : '新增成功'); |
151 | } finally { | 151 | } finally { |
152 | - setModalProps({ confirmLoading: false }); | 152 | + setTimeout(() => { |
153 | + setModalProps({ confirmLoading: false }); | ||
154 | + }, 300); | ||
153 | } | 155 | } |
154 | } | 156 | } |
155 | return { | 157 | return { |