1
0
mirror of synced 2026-04-03 14:38:37 +08:00

feat(editor): 优化数据源字段选择器交互

This commit is contained in:
roymondchen
2024-06-27 19:55:06 +08:00
parent 77f13fa898
commit 0ffc223459
10 changed files with 273 additions and 78 deletions

View File

@@ -23,17 +23,15 @@ export default [
text: '数据源数据',
value: 'value',
dataSourceFieldType: ['array'],
checkStrictly: false,
checkStrictly: true,
type: 'data-source-field-select',
onChange: (vm: any, v: string[] = [], { model }: any) => {
if (Array.isArray(v)) {
if (Array.isArray(v) && v.length > 1) {
const [dsId, ...keys] = v;
model.dsField = [dsId.replace(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, ''), ...keys];
} else {
model.dsField = [];
}
return v;
},
},
{