fix(data-source,utils): 显示条件编译对于undefined理解不正确
This commit is contained in:
@@ -62,7 +62,7 @@ export const createDataSourceManager = (app: AppCore, useMock?: boolean, initial
|
||||
'update-data',
|
||||
getNodes(nodeIds, dsl.items).map((node) => {
|
||||
const newNode = cloneDeep(node);
|
||||
newNode.condResult = dataSourceManager.compliedConds(node);
|
||||
newNode.condResult = dataSourceManager.compliedConds(newNode);
|
||||
return dataSourceManager.compiledNode(newNode);
|
||||
}),
|
||||
sourceId,
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface DataSourceOptions<T extends DataSourceSchema = DataSourceSchema
|
||||
}
|
||||
|
||||
export interface HttpDataSourceSchema extends DataSourceSchema {
|
||||
type: 'http';
|
||||
options: HttpOptions;
|
||||
responseOptions?: {
|
||||
dataPath?: string;
|
||||
|
||||
@@ -41,7 +41,7 @@ describe('DataSourceManager', () => {
|
||||
test('registe', () => {
|
||||
class TestDataSource extends DataSource {}
|
||||
|
||||
DataSourceManager.registe('test', TestDataSource);
|
||||
DataSourceManager.registe('test', TestDataSource as any);
|
||||
expect(DataSourceManager.getDataSourceClass('test')).toBe(TestDataSource);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user