Commit e1b8e32a880f186d0dbc32292c7675f75ae4a4c5

Authored by fengtao
1 parent 0e5f85d3

fix:修改转换脚本重复提交问题

@@ -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 = () => {