WebCAD-Lib-TS API 文档 - v1.0.0
    Preparing search index...

    Interface PropertyInfo

    属性信息接口 用于在属性面板中显示自定义实体的属性

    interface PropertyInfo {
        category?: string;
        label: string;
        value: string;
        editable: boolean;
        type?:
            | "string"
            | "number"
            | "boolean"
            | "point"
            | "angle"
            | "color"
            | "select";
        options?: { label: string; value: any }[];
        range?: { min?: number; max?: number; step?: number };
        onChange?: (newValue: any) => void;
        booleanValue?: boolean;
        isMultiValue?: boolean;
        colorIndex?: number;
    }
    Index

    Properties

    category?: string

    属性分类(如"基本"、"几何"等)

    label: string

    属性标签名称

    value: string

    属性值(显示用)

    editable: boolean

    是否可编辑

    type?: "string" | "number" | "boolean" | "point" | "angle" | "color" | "select"

    属性类型(用于确定编辑控件)

    options?: { label: string; value: any }[]

    选项列表(当type为select时使用)

    range?: { min?: number; max?: number; step?: number }

    数值范围(当type为number或angle时使用)

    onChange?: (newValue: any) => void

    属性变更回调

    booleanValue?: boolean

    布尔值(当type为boolean时使用,用于控件绑定)

    isMultiValue?: boolean

    是否为多值状态(多个实体选择且值不同时为true)

    colorIndex?: number

    颜色索引(当type为color时使用,ACI颜色索引,256表示随层)