jigsaw icon indicating copy to clipboard operation
jigsaw copied to clipboard

jigsaw app切换非组件皮肤方案

Open hpyou opened this issue 6 years ago • 0 comments

在 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设置非组件的皮肤

hpyou avatar Apr 29 '19 06:04 hpyou