Skip to content

jigsaw app切换非组件皮肤方案 #922

@hpyou

Description

@hpyou

在 JigsawTheme中暴露皮肤参数

    // 获取主要色值
    public static getPrimaryColor() {
        return this.colorFactory(['#41addc', "#029af2"]);
    }
    // 获取panel背景色
    public static getPanelBackgroundColor(): string {
        return this.colorFactory([null, "#102331"]);
    }
    // 获取边框颜色
    public static getBorderColor(): string {
        return this.colorFactory([null, "#102331"]);
    }

在jigsaw app中获取皮肤参数,并放到全局

this.dataBus.theme = {
    primaryColor: JigsawTheme.getPrimaryColor(),
    panelBackgroundColor: JigsawTheme.PanelBackgroundColor(),
    borderColor: JigsawTheme.getBorderColor()
}

在awade中引用this.dataBus.theme设置非组件的皮肤

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions