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

    Interface SidebarPanelConfig

    侧边栏面板配置接口

    定义注册侧边栏面板时需要提供的配置选项。

    SidebarPanelConfig

    const config: SidebarPanelConfig = {
    name: "my-panel",
    label: "我的面板",
    icon: "images/actbar/my-icon.svg",
    position: "left",
    panelClass: MyCustomPanel
    };
    interface SidebarPanelConfig {
        name: string;
        label: string;
        icon: string;
        position?: "left" | "right";
        panelClass: typeof LitElement;
        tagName?: string;
        order?: number;
    }
    Index

    Properties

    name: string

    面板唯一标识符(用于内部识别和 API 调用) 建议使用小写字母和连字符,如 "my-panel"

    label: string

    面板显示标签(显示在面板标题栏)

    icon: string

    面板图标路径(显示在活动栏) 支持相对路径或绝对URL

    position?: "left" | "right"

    面板位置

    • "left": 左侧侧边栏
    • "right": 右侧侧边栏
    "left"
    
    panelClass: typeof LitElement

    面板组件类(必须继承自 BasePanelComponent 或 LitElement)

    tagName?: string

    自定义元素标签名(可选,如不提供则自动生成) 格式要求:必须包含连字符,如 "my-custom-panel"

    order?: number

    面板显示顺序(数字越小越靠前)

    100