修改颜色选择器样式,显示rgba格式

This commit is contained in:
zh
2025-07-25 09:18:28 +08:00
parent 8ca3576c3e
commit 829d1a59f7
5 changed files with 163 additions and 35 deletions

View File

@ -746,6 +746,7 @@
o.colorHsbaToRgba)(e.hsba) : e.pickerInput.value = (0,
o.colorRgbaToHex)((0,
o.colorHsbaToRgba)(e.hsba))
e.config.pickerInputChange && e.config.pickerInputChange()
}
function f(e) {
if (this.pickerFlag = !1,
@ -795,6 +796,8 @@
n.isFunction)(e.sure) ? e.sure : null,
clear: (0,
n.isFunction)(e.clear) ? e.clear : null,
pickerInputChange: (0,
n.isFunction)(e.pickerInputChange) ? e.pickerInputChange : null,
startMainCallback: (0,
n.isFunction)(e.startMainCallback) ? e.startMainCallback : null,
clickDefineColor: (0,
@ -891,6 +894,7 @@
var u = i - e.hsba.a * i;
c(e.alphaBarThumb, "top", u + "px")
}
e.config.pickerInputChange && e.config.pickerInputChange()
}
function b(e, t) {
var r = e.hueBar.offsetHeight
@ -1086,6 +1090,7 @@
o.colorRgbaToHex)((0,
o.colorHsbaToRgba)(e.hsba));
e.config.defaultColor = e.pickerInput.value
e.config.pickerInputChange && e.config.pickerInputChange()
e.render(e.box.parentNode, e.config),
e.config.sure(t, e)
}(r)

View File

@ -1034,8 +1034,19 @@
padding: 5px;
position: fixed !important;
}
.YJ-custom-base-dialog>.content .ew-color-picker input {
font-size: 14px;
line-height: 28px;
height: 28px;
padding: 0 8px;
font-weight: 400;
}
.YJ-custom-base-dialog>.content .ew-color-picker .input-number-unit input[type=number] {
padding: 0 20px 0 8px;
width: 66px;
}
.YJ-custom-base-dialog .ew-color-picker>.ew-color-picker-content {
.YJ-custom-base-dialog.ew-color-picker>.ew-color-picker-content {
margin-bottom: 10px;
}
.YJ-custom-base-dialog .ew-color-picker>.ew-color-picker-content>.ew-color-panel {
@ -1064,6 +1075,10 @@
line-height: 24px;
}
.YJ-custom-base-dialog>.content>div .ew-color-picker .row>.col {
margin: 0 !important;
}
.YJ-custom-base-dialog .ew-color-picker .icon-pen-box .icon-pen {
margin: 0;
}
@ -1079,9 +1094,9 @@
}
.YJ-custom-base-dialog .ew-color-picker .color-alpha>input {
font-weight: 400;
font-family: Arial;
font-size: 14px;
font-weight: 400 !important;
font-family: Arial !important;
font-size: 14px !important;
}
.YJ-custom-base-dialog .ew-color-picker>.ew-pre-define-color-container {
@ -1169,10 +1184,13 @@
.YJ-custom-base-dialog .ew-color-picker .ew-color-dropbtngroup {
display: flex;
position: unset;
}
.YJ-custom-base-dialog .ew-color-picker .ew-color-dropbtngroup button {
padding: 5px 10px 4px 10px;
padding: 0 8px;
height: 28px;
line-height: 28px;
}
.YJ-custom-base-dialog .ew-color-picker .ew-color-dropbtngroup button.ew-color-clear {
margin-right: 8px;

View File

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="9.19921875" viewBox="0 0 12 9.19921875" fill="none">
<path d="M4.66806 9.2C4.47815 9.2 4.29548 9.12926 4.15776 9.00078L0.22761 5.35124C-0.0666872 5.0784 -0.0768368 4.62509 0.204411 4.33925C0.485649 4.0534 0.953909 4.04474 1.2482 4.31759L4.60427 7.43442L10.6916 0.260945C10.9511 -0.0436629 11.4165 -0.0884161 11.731 0.162779C12.0457 0.413972 12.0905 0.864388 11.8325 1.17044L5.23924 8.94014C5.10877 9.09461 4.91741 9.18845 4.713 9.2L4.66806 9.2Z" fill="#FFFFFF" >
</path>
</svg>

After

Width:  |  Height:  |  Size: 582 B