update:添加多个组件"保存"时的loading状态

This commit is contained in:
CGD
2025-04-21 11:36:10 +08:00
parent 5904ee1571
commit ec9fa32c81
5 changed files with 92 additions and 34 deletions
+3 -1
View File
@@ -312,9 +312,10 @@ export default {
this.currentPage = page;
this.$refs.modelTable.clearSelection();
},
handleModelSave({ provideCode, formData }) {
handleModelSave({ provideCode, formData, done }) {
const modelType = this.activeTab;
const id = formData.id;
Api.model.updateModel(
{ modelType, provideCode, id, formData },
({ data }) => {
@@ -325,6 +326,7 @@ export default {
} else {
this.$message.error(data.msg || '保存失败');
}
done && done(); // 调用done回调关闭加载状态
}
);
},