mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-17 01:19:18 +08:00
feat(editor): dataSourceService.add返回添加的数据源
This commit is contained in:
parent
eea8032f0d
commit
ab02c2f3ee
@ -82,6 +82,8 @@ class DataSource extends BaseService {
|
|||||||
this.get('dataSources').push(newConfig);
|
this.get('dataSources').push(newConfig);
|
||||||
|
|
||||||
this.emit('add', newConfig);
|
this.emit('add', newConfig);
|
||||||
|
|
||||||
|
return newConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public update(config: DataSourceSchema) {
|
public update(config: DataSourceSchema) {
|
||||||
@ -92,6 +94,8 @@ class DataSource extends BaseService {
|
|||||||
dataSources[index] = cloneDeep(config);
|
dataSources[index] = cloneDeep(config);
|
||||||
|
|
||||||
this.emit('update', config);
|
this.emit('update', config);
|
||||||
|
|
||||||
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public remove(id: string) {
|
public remove(id: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user