1
0
mirror of synced 2026-03-24 03:38:34 +08:00

fix(data-source,utils): 显示条件编译对于undefined理解不正确

This commit is contained in:
roymondchen
2023-12-04 20:35:03 +08:00
parent 4870babc43
commit 75dd89f2fe
5 changed files with 27 additions and 28 deletions

View File

@@ -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,

View File

@@ -12,6 +12,7 @@ export interface DataSourceOptions<T extends DataSourceSchema = DataSourceSchema
}
export interface HttpDataSourceSchema extends DataSourceSchema {
type: 'http';
options: HttpOptions;
responseOptions?: {
dataPath?: string;

View File

@@ -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);
});