-
-
-
-
-
-
-
@@ -265,15 +267,22 @@
},
getFormatColor () {
const value = this.saturationColors;
+ const format = this.format;
let color;
- if (this.format) {
- if (this.format === 'hsl') {
+
+ const rgba = `rgba(${value.rgba.r}, ${value.rgba.g}, ${value.rgba.b}, ${value.rgba.a})`;
+ if (format) {
+ if (format === 'hsl') {
color = tinycolor(value.hsl).toHslString();
- } else if (this.format === 'hsv') {
+ } else if (format === 'hsv') {
color = tinycolor(value.hsv).toHsvString();
+ } else if (format === 'hex') {
+ color = value.hex;
+ } else if (format === 'rgb') {
+ color = rgba;
}
} else if (this.alpha) {
- color = `rgba(${value.rgba.r}, ${value.rgba.g}, ${value.rgba.b}, ${value.rgba.a})`;
+ color = rgba;
} else {
color = value.hex;
}
diff --git a/src/styles/components/color-picker.less b/src/styles/components/color-picker.less
index 525721c..1c51f26 100644
--- a/src/styles/components/color-picker.less
+++ b/src/styles/components/color-picker.less
@@ -1,6 +1,9 @@
@color-picker-prefix-cls: ~"@{css-prefix}color-picker";
.@{color-picker-prefix-cls} {
+ & .@{select-dropdown-prefix-cls} {
+ padding: 0;
+ }
&-rel{
line-height: 0;
}
@@ -38,7 +41,9 @@
}
&-picker{
- padding: 4px 8px 0;
+ &-wrapper{
+ padding: 8px 8px 0;
+ }
&-panel{
width: 200px;
margin: 0 auto;
--
libgit2 0.21.4