mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 10:27:22 +00:00
feat: 增加 getConfig / getItems / selected 等兼容 vision 的 API
This commit is contained in:
parent
b0f41a7acf
commit
9a3352b054
@ -117,9 +117,23 @@ export class SettingField extends SettingPropEntry implements SettingEntry {
|
|||||||
this.disposeItems();
|
this.disposeItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ======= compatibles for vision ======
|
||||||
|
|
||||||
|
getConfig(): FieldConfig {
|
||||||
|
return this._config;
|
||||||
|
}
|
||||||
|
|
||||||
|
getItems(filter?: (item: SettingField | CustomView) => boolean): Array<SettingField | CustomView> {
|
||||||
|
return this._items.filter(item => {
|
||||||
|
if (filter) {
|
||||||
|
return filter(item);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private hotValue: any;
|
private hotValue: any;
|
||||||
|
|
||||||
// ======= compatibles for vision ======
|
|
||||||
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) {
|
setValue(val: any, isHotValue?: boolean, force?: boolean, extraOptions?: any) {
|
||||||
if (isHotValue) {
|
if (isHotValue) {
|
||||||
this.setHotValue(val, extraOptions);
|
this.setHotValue(val, extraOptions);
|
||||||
|
|||||||
@ -124,6 +124,7 @@ class SettingFieldView extends Component<{ field: SettingField }> {
|
|||||||
key: field.id,
|
key: field.id,
|
||||||
// === injection
|
// === injection
|
||||||
prop: field, // for compatible vision
|
prop: field, // for compatible vision
|
||||||
|
selected: field.top?.getNode(),
|
||||||
field,
|
field,
|
||||||
// === IO
|
// === IO
|
||||||
value, // reaction point
|
value, // reaction point
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user