Showing
1 changed file
with
2 additions
and
9 deletions
@@ -120,8 +120,8 @@ | @@ -120,8 +120,8 @@ | ||
120 | 120 | ||
121 | //提交按钮 | 121 | //提交按钮 |
122 | async function handleSubmit() { | 122 | async function handleSubmit() { |
123 | - setDrawerProps({ confirmLoading: true }); | ||
124 | try { | 123 | try { |
124 | + setDrawerProps({ confirmLoading: true }); | ||
125 | const values = await validate(); | 125 | const values = await validate(); |
126 | const req = { | 126 | const req = { |
127 | id: values.id, | 127 | id: values.id, |
@@ -153,16 +153,9 @@ | @@ -153,16 +153,9 @@ | ||
153 | const { createMessage } = useMessage(); | 153 | const { createMessage } = useMessage(); |
154 | createMessage.error(`${e.message}`); | 154 | createMessage.error(`${e.message}`); |
155 | }) | 155 | }) |
156 | - .finally(() => { | ||
157 | - setTimeout(() => { | ||
158 | - setDrawerProps({ confirmLoading: false }); | ||
159 | - }, 300); | ||
160 | - }); | 156 | + .finally(() => {}); |
161 | } catch (e) { | 157 | } catch (e) { |
162 | } finally { | 158 | } finally { |
163 | - setTimeout(() => { | ||
164 | - setDrawerProps({ confirmLoading: false }); | ||
165 | - }, 300); | ||
166 | } | 159 | } |
167 | } | 160 | } |
168 | return { | 161 | return { |