mirror of
https://gitee.com/layui/layui.git
synced 2025-08-23 22:11:38 +08:00
修复 colorpicker 因上个版本 pr
导致的选择候选色值异常问题
This commit is contained in:
parent
38059463df
commit
b9119c10c4
@ -59,9 +59,9 @@ layui.define(['jquery', 'lay'], function(exports){
|
||||
hsb.b = max;
|
||||
hsb.s = max !== 0 ? 255*delta/max : 0;
|
||||
if(hsb.s !== 0){
|
||||
if(rgb.r === max){
|
||||
if(rgb.r == max){ // 因 rgb 中返回的数字为 string 类型
|
||||
hsb.h = (rgb.g - rgb.b) / delta;
|
||||
}else if(rgb.g === max){
|
||||
}else if(rgb.g == max){
|
||||
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
||||
}else{
|
||||
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
||||
|
Loading…
Reference in New Issue
Block a user