feat(editor): 优化依赖收集体验,减小收集任务粒度,修改配置时识别是否需要触发重新收集
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import type { DataSourceSchema } from '@tmagic/core';
|
||||
import type { ContainerChangeEventData } from '@tmagic/form';
|
||||
|
||||
import DataSourceConfigPanel from '@editor/layouts/sidebar/data-source/DataSourceConfigPanel.vue';
|
||||
import type { DataSourceService } from '@editor/services/dataSource';
|
||||
@@ -24,9 +25,9 @@ export const useDataSourceEdit = (dataSourceService?: DataSourceService) => {
|
||||
editDialog.value.show();
|
||||
};
|
||||
|
||||
const submitDataSourceHandler = (value: DataSourceSchema) => {
|
||||
const submitDataSourceHandler = (value: DataSourceSchema, eventData: ContainerChangeEventData) => {
|
||||
if (value.id) {
|
||||
dataSourceService?.update(value);
|
||||
dataSourceService?.update(value, { changeRecords: eventData.changeRecords });
|
||||
} else {
|
||||
dataSourceService?.add(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user