修复前端缺少 @ctrl/tinycolor 依赖库,以及不兼容4.1.x版本的问题
This commit is contained in:
parent
ecb44bc1e7
commit
e87f5b07cd
@ -13,6 +13,7 @@
|
|||||||
"format": "prettier --write src/"
|
"format": "prettier --write src/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ctrl/tinycolor": "^4.1.0",
|
||||||
"axios": "^0.28.0",
|
"axios": "^0.28.0",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.0",
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import type {
|
|||||||
UpdateInferData,
|
UpdateInferData,
|
||||||
UpdateKeyValueData
|
UpdateKeyValueData
|
||||||
} from './type'
|
} from './type'
|
||||||
import tinycolor from '@ctrl/tinycolor'
|
import { TinyColor } from '@ctrl/tinycolor'
|
||||||
// 引入默认推断数据
|
// 引入默认推断数据
|
||||||
import inferData from './defaultInferData'
|
import inferData from './defaultInferData'
|
||||||
// 引入默认keyValue数据
|
// 引入默认keyValue数据
|
||||||
@ -119,7 +119,7 @@ class Theme {
|
|||||||
l.toString()
|
l.toString()
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
[varName]: tinycolor(inferData.value)
|
[varName]: new TinyColor(inferData.value)
|
||||||
.mix(key === 'light' ? this.colorWhite : this.colorBlack, l * 10)
|
.mix(key === 'light' ? this.colorWhite : this.colorBlack, l * 10)
|
||||||
.toHexString()
|
.toHexString()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user