mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-12 17:08:14 +00:00
chore: 优化 top entry 的 get 子项逻辑
This commit is contained in:
parent
1eec3b3d4f
commit
8555b94630
@ -13,5 +13,5 @@ export interface SettingEntry extends SettingTarget {
|
||||
// 父级
|
||||
readonly parent: SettingEntry;
|
||||
|
||||
get(propName: string | number): SettingEntry;
|
||||
get(propName: string | number): SettingEntry | null;
|
||||
}
|
||||
|
||||
@ -150,7 +150,8 @@ export class SettingTopEntry implements SettingEntry {
|
||||
/**
|
||||
* 获取子项
|
||||
*/
|
||||
get(propName: string | number): SettingPropEntry {
|
||||
get(propName: string | number): SettingPropEntry | null {
|
||||
if (!propName) return null;
|
||||
return this._settingFieldMap[propName] || (new SettingPropEntry(this, propName));
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ export interface SettingTarget {
|
||||
setValue(value: any): void;
|
||||
|
||||
// 取得子项
|
||||
get(propName: string | number): SettingTarget;
|
||||
get(propName: string | number): SettingTarget | null;
|
||||
|
||||
// 获取子项属性值
|
||||
getPropValue(propName: string | number): any;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user