fix(editor): 修改未包含数据源的配置,画布中没有实时更新
This commit is contained in:
@@ -509,3 +509,19 @@ export const traverseNode = <T extends NodeItem = NodeItem>(
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const isValueIncludeDataSource = (value: any) => {
|
||||
if (typeof value === 'string' && /\$\{([\s\S]+?)\}/.test(value)) {
|
||||
return true;
|
||||
}
|
||||
if (Array.isArray(value) && `${value[0]}`.startsWith(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX)) {
|
||||
return true;
|
||||
}
|
||||
if (value?.isBindDataSource && value.dataSourceId) {
|
||||
return true;
|
||||
}
|
||||
if (value?.isBindDataSourceField && value.dataSourceId) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user