mirror of
				https://github.com/Tencent/tmagic-editor.git
				synced 2025-11-04 02:28:04 +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.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) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user