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