Skip to main content
Version: 3.7

PropDeclaration 组件属性

1. 结构声明

class PropDeclaration extends BaseNode {
name: string = '';
title: string;
group!: '基础信息' | '数据属性' | '主要属性' | '交互属性' | '状态属性' | '样式属性' | '工具属性';
icon?: string;
description?: string;
tsType: TSExpression;
sync!: boolean;
tooltipLink?: string;
docDescription?: string;
bindHide!: boolean;
bindOpen!: boolean;
tabKind!: 'property' | 'style';
setter!: BaseSetter;
layout!: 'block' | 'inline';
defaultValue?: DefaultValue;
tsDesignerValue?: TSExpression<'any'>;
tsIf?: TSExpression<'(target: T) => boolean'>;
tsDisabledIf?: TSExpression<'(target: T) => boolean'>;
tsOnChange?: TSExpression<'Array<{ update: any; if?: (value: T[K]) => boolean } | { clear: Array<string>; if?: (value: T[K]) => boolean }>'>;
}