@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    接口 ToggleOptions

    switch 节点的可选项。

    interface ToggleOptions {
        action?: {
            commandId: string;
            input?: JSONType;
            inputFrom?: Record<string, string>;
        };
        busy?: boolean;
        disabled?: boolean;
        disabledReason?: string;
        fallback?: ViewNode;
    }
    索引

    属性

    action?: {
        commandId: string;
        input?: JSONType;
        inputFrom?: Record<string, string>;
    }

    用户请求切换时回送的 Command;input 应携带目标状态以便 Runtime 幂等结算。

    busy?: boolean

    切换请求正在由 Runtime 结算。

    disabled?: boolean

    当前不可切换。

    disabledReason?: string

    不可切换的可见原因;disabled 为真时应当提供。

    fallback?: ViewNode

    旧宿主不认识 switch 时渲染的降级内容。