修改自定义颜色插件

This commit is contained in:
zh
2025-07-16 16:03:14 +08:00
parent 3eadec9b11
commit 6a71f41a19
2 changed files with 8 additions and 4 deletions

View File

@ -114,7 +114,7 @@ class YJColorPicker {
if ((e.target.dataset.min) && value < Number(e.target.dataset.min)) {
value = Number(e.target.dataset.min)
}
pickAlphaInput.value = value
pickAlphaInput.value = Number(value.toFixed(2))
}
})
if (_this.pickAlphaInputValue || _this.pickAlphaInputValue === 0 || _this.pickAlphaInputValue === '0') {
@ -268,7 +268,7 @@ class YJColorPicker {
function clickDefineColor(color) {
if (pickAlphaInput) {
let c = Cesium.Color.fromCssColorString(color)
pickAlphaInput.value = c.alpha * 100
pickAlphaInput.value = Number((c.alpha * 100).toFixed(2))
}
}