Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hpyou opened this issue Apr 29, 2019 · 0 comments
Open

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

hpyou opened this issue Apr 29, 2019 · 0 comments

Comments

@hpyou
Copy link
Collaborator

hpyou commented Apr 29, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant