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

fix(editor): 修改未包含数据源的配置,画布中没有实时更新

This commit is contained in:
roymondchen
2024-12-04 16:26:48 +08:00
committed by roymondchen
parent 945aaaddcb
commit 0d6420215c
3 changed files with 21 additions and 20 deletions

View File

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