Showing
1 changed file
with
4 additions
and
3 deletions
@@ -84,10 +84,9 @@ | @@ -84,10 +84,9 @@ | ||
84 | emit('isStatus', { status: 1, jsCode }); | 84 | emit('isStatus', { status: 1, jsCode }); |
85 | }; | 85 | }; |
86 | const handleSubmit = async () => { | 86 | const handleSubmit = async () => { |
87 | + setDrawerProps({ confirmLoading: true }); | ||
87 | const fieldsValue = getFieldsValue(); | 88 | const fieldsValue = getFieldsValue(); |
88 | try { | 89 | try { |
89 | - setDrawerProps({ confirmLoading: true }); | ||
90 | - | ||
91 | await createOrEditTransformScriptApi({ | 90 | await createOrEditTransformScriptApi({ |
92 | configuration: { | 91 | configuration: { |
93 | jsScript: aceEditor.value.getValue(), | 92 | jsScript: aceEditor.value.getValue(), |
@@ -103,7 +102,9 @@ | @@ -103,7 +102,9 @@ | ||
103 | const { createMessage } = useMessage(); | 102 | const { createMessage } = useMessage(); |
104 | createMessage.success('保存失败'); | 103 | createMessage.success('保存失败'); |
105 | } finally { | 104 | } finally { |
106 | - setDrawerProps({ confirmLoading: false }); | 105 | + setTimeout(() => { |
106 | + setDrawerProps({ confirmLoading: false }); | ||
107 | + }, 300); | ||
107 | } | 108 | } |
108 | }; | 109 | }; |
109 | const handleFormat = () => { | 110 | const handleFormat = () => { |