From ab02c2f3ee7e97c0a64da627768447070acfc932 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Tue, 21 Nov 2023 11:35:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(editor):=20dataSourceService.add=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor/src/services/dataSource.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/editor/src/services/dataSource.ts b/packages/editor/src/services/dataSource.ts index 9889463d..7d3a9b56 100644 --- a/packages/editor/src/services/dataSource.ts +++ b/packages/editor/src/services/dataSource.ts @@ -82,6 +82,8 @@ class DataSource extends BaseService { this.get('dataSources').push(newConfig); this.emit('add', newConfig); + + return newConfig; } public update(config: DataSourceSchema) { @@ -92,6 +94,8 @@ class DataSource extends BaseService { dataSources[index] = cloneDeep(config); this.emit('update', config); + + return config; } public remove(id: string) {