mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-07 08:57:19 +08:00
types: supplemental type declaration
This commit is contained in:
parent
5efeb28eb3
commit
9797534458
@ -26,7 +26,9 @@ export const writeNewStyle = (newStyle: string): void => {
|
||||
};
|
||||
|
||||
// 根据主题色,生成最新的样式表
|
||||
export const createNewStyle = (primaryStyle: string): string => {
|
||||
export const createNewStyle = (
|
||||
primaryStyle: Record<string, any>
|
||||
): Record<string, any> => {
|
||||
// 根据主色生成色值表
|
||||
const colors = createColors(primaryStyle);
|
||||
// 在当前ep的默认样式表中标记需要替换的色值
|
||||
@ -41,7 +43,9 @@ export const createNewStyle = (primaryStyle: string): string => {
|
||||
return cssText;
|
||||
};
|
||||
|
||||
export const createColors = (primary: string) => {
|
||||
export const createColors = (
|
||||
primary: Record<string, any>
|
||||
): Record<string, any> => {
|
||||
if (!primary) return;
|
||||
const colors = {
|
||||
primary
|
||||
@ -53,7 +57,7 @@ export const createColors = (primary: string) => {
|
||||
return colors;
|
||||
};
|
||||
|
||||
const getStyleTemplate = (data: string): string => {
|
||||
const getStyleTemplate = (data: Record<string, any>): Record<string, any> => {
|
||||
const colorMap = {
|
||||
"#3a8ee6": "shade-1",
|
||||
"#409eff": "primary",
|
||||
|
Loading…
x
Reference in New Issue
Block a user