Browse Source

BI-93324 选色控件视觉验收修改

es6
windy 3 years ago
parent
commit
5ba9739935
  1. BIN
      dist/images/1x/icon/auto_square_normal.png
  2. BIN
      dist/images/1x/icon/dark/auto_square_normal.png
  3. BIN
      dist/images/1x/icon/dark/trans_disable.png
  4. BIN
      dist/images/1x/icon/trans_disable.png
  5. BIN
      dist/images/2x/icon/auto_disable.png
  6. BIN
      dist/images/2x/icon/auto_square_normal.png
  7. BIN
      dist/images/2x/icon/dark/auto_square_normal.png
  8. BIN
      dist/images/2x/icon/dark/trans_disable.png
  9. BIN
      dist/images/2x/icon/trans_disable.png
  10. 2
      src/case/colorchooser/colorchooser.js
  11. 6
      src/case/colorchooser/colorchooser.popup.hex.js
  12. 2
      src/case/colorchooser/colorpicker/button/button.colorpicker.js
  13. 18
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.js
  14. 14
      src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js
  15. 8
      src/less/base/colorchooser/colorpicker/editor.colorpicker.less
  16. 2
      src/less/lib/background.less
  17. 4
      src/less/lib/icon.less
  18. 14
      src/less/resource/background.less
  19. 7
      src/less/resource/icon.less

BIN
dist/images/1x/icon/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

BIN
dist/images/1x/icon/dark/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

BIN
dist/images/1x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

BIN
dist/images/1x/icon/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 535 B

BIN
dist/images/2x/icon/auto_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
dist/images/2x/icon/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 996 B

BIN
dist/images/2x/icon/dark/auto_square_normal.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

BIN
dist/images/2x/icon/dark/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

BIN
dist/images/2x/icon/trans_disable.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

2
src/case/colorchooser/colorchooser.js

@ -60,7 +60,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
}] }]
}, o.popup), }, o.popup),
value: o.value, value: o.value,
width: 292 width: 300
}, },
value: o.value value: o.value
}); });

6
src/case/colorchooser/colorchooser.popup.hex.js

@ -7,7 +7,7 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 292, width: 300,
recommendColorsGetter: BI.emptyFn, // 推荐色获取接口 recommendColorsGetter: BI.emptyFn, // 推荐色获取接口
simple: false // 简单模式, popup中没有自动和透明 simple: false // 简单模式, popup中没有自动和透明
}, },
@ -21,11 +21,11 @@ BI.HexColorChooserPopup = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.vertical", type: "bi.vertical",
hgap: 10, hgap: 15,
items: [BI.extend({ items: [BI.extend({
type: o.simple ? "bi.simple_hex_color_picker_editor" : "bi.hex_color_picker_editor", type: o.simple ? "bi.simple_hex_color_picker_editor" : "bi.hex_color_picker_editor",
value: o.value, value: o.value,
height: o.simple ? 30 : 64, height: o.simple ? 36 : 70,
listeners: [{ listeners: [{
eventName: BI.ColorPickerEditor.EVENT_CHANGE, eventName: BI.ColorPickerEditor.EVENT_CHANGE,
action: function () { action: function () {

2
src/case/colorchooser/colorpicker/button/button.colorpicker.js

@ -19,7 +19,7 @@ BI.ColorPickerButton = BI.inherit(BI.BasicButton, {
var self = this, o = this.options; var self = this, o = this.options;
if (BI.isNotNull(o.value)) { if (BI.isNotNull(o.value)) {
if (o.value === '') { if (o.value === '') {
this.element.addClass("auto-color-normal-background"); this.element.addClass("auto-color-square-normal-background");
} else if (o.value === "transparent") { } else if (o.value === "transparent") {
this.element.addClass("trans-color-background"); this.element.addClass("trans-color-background");
} else { } else {

18
src/case/colorchooser/colorpicker/editor.colorpicker.hex.js

@ -39,7 +39,7 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true, allowBlank: true,
value: 255, value: 255,
width: c.RGB_WIDTH, width: c.RGB_WIDTH,
height: 20, height: 24,
listeners: [{ listeners: [{
eventName: BI.TextEditor.EVENT_CHANGE, eventName: BI.TextEditor.EVENT_CHANGE,
action: function () { action: function () {
@ -122,20 +122,20 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
}, { }, {
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
columnSize: [16, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH], columnSize: [22, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
rgap: 5, rgap: 5,
items: [{ items: [{
el: { el: {
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card bi-border", cls: "color-picker-editor-display bi-card bi-border",
height: 16, height: 22,
width: 16, width: 22,
ref: function (_ref) { ref: function (_ref) {
self.colorShow = _ref; self.colorShow = _ref;
} }
}, },
width: 16 width: 18
}, { }, {
type: "bi.label", type: "bi.label",
text: "#", text: "#",
@ -150,7 +150,7 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true, allowBlank: true,
errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"), errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"),
width: c.HEX_WIDTH, width: c.HEX_WIDTH,
height: 20, height: 24,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
action: function () { action: function () {
@ -239,11 +239,11 @@ BI.HexColorPickerEditor = BI.inherit(BI.Widget, {
_showPreColor: function (color) { _showPreColor: function (color) {
if (color === "") { if (color === "") {
this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-normal-background"); this.colorShow.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-square-normal-background");
} else if (color === "transparent") { } else if (color === "transparent") {
this.colorShow.element.css("background-color", "").removeClass("auto-color-normal-background").addClass("trans-color-background"); this.colorShow.element.css("background-color", "").removeClass("auto-color-square-normal-background").addClass("trans-color-background");
} else { } else {
this.colorShow.element.css({"background-color": color}).removeClass("auto-color-normal-background").removeClass("trans-color-background"); this.colorShow.element.css({"background-color": color}).removeClass("auto-color-square-normal-background").removeClass("trans-color-background");
} }
}, },

14
src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js

@ -13,7 +13,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-picker-editor", baseCls: "bi-color-picker-editor",
height: 30 height: 36
}, },
render: function () { render: function () {
@ -37,7 +37,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true, allowBlank: true,
value: 255, value: 255,
width: c.RGB_WIDTH, width: c.RGB_WIDTH,
height: 20, height: 24,
listeners: [{ listeners: [{
eventName: BI.TextEditor.EVENT_CHANGE, eventName: BI.TextEditor.EVENT_CHANGE,
action: function () { action: function () {
@ -58,18 +58,18 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
rgap: 5, rgap: 5,
columnSize: [16, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH], columnSize: [22, 10, 'fill', 12, c.RGB_WIDTH, 12, c.RGB_WIDTH, 12, c.RGB_WIDTH],
items: [{ items: [{
el: { el: {
type: "bi.layout", type: "bi.layout",
cls: "color-picker-editor-display bi-card bi-border", cls: "color-picker-editor-display bi-card bi-border",
height: 16, height: 22,
width: 16, width: 22,
ref: function (_ref) { ref: function (_ref) {
self.colorShow = _ref; self.colorShow = _ref;
} }
}, },
width: 16, width: 18,
}, { }, {
type: "bi.label", type: "bi.label",
text: "#", text: "#",
@ -84,7 +84,7 @@ BI.SimpleHexColorPickerEditor = BI.inherit(BI.Widget, {
allowBlank: true, allowBlank: true,
errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"), errorText: BI.i18nText("BI-Color_Picker_Error_Text_Hex"),
width: c.HEX_WIDTH, width: c.HEX_WIDTH,
height: 20, height: 24,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
action: function () { action: function () {

8
src/less/base/colorchooser/colorpicker/editor.colorpicker.less

@ -5,12 +5,4 @@
& .color-picker-editor-display { & .color-picker-editor-display {
.border-radius(2px); .border-radius(2px);
} }
&.disabled {
& .auto-color-normal-background {
.auto-color-normal-disabled-background();
}
& .trans-color-background {
.trans-color-disabled-background();
}
}
} }

2
src/less/lib/background.less

@ -4,9 +4,9 @@
//右下角没有小三角 //右下角没有小三角
@background-auto-color-normal: "icon/auto_normal.png"; @background-auto-color-normal: "icon/auto_normal.png";
@background-auto-color-normal-disabled: "icon/auto_disable.png";
@background-trans-color: "background/trans_normal.png"; @background-trans-color: "background/trans_normal.png";
@background-trans-color-disabled: "background/trans_disable.png"; @background-trans-color-disabled: "background/trans_disable.png";
@background-auto-color-square-normal: "icon/auto_square_normal.png";
@background-farbtastic-wheel:"background/wheel.png"; @background-farbtastic-wheel:"background/wheel.png";
@background-farbtastic-overlay:"background/mask.png"; @background-farbtastic-overlay:"background/mask.png";

4
src/less/lib/icon.less

@ -50,12 +50,12 @@
//颜色自动、透明 //颜色自动、透明
@icon-auto-normal: "icon/auto_normal.png"; @icon-auto-normal: "icon/auto_normal.png";
@icon-auto-square-normal: "icon/auto_square_normal.png";
@icon-auto-select: "icon/auto_select.png"; @icon-auto-select: "icon/auto_select.png";
@icon-auto-disable: "icon/auto_disable.png";
@icon-trans-normal: "icon/trans_normal.png"; @icon-trans-normal: "icon/trans_normal.png";
@icon-trans-select: "icon/trans_select.png"; @icon-trans-select: "icon/trans_select.png";
@icon-trans-disable: "icon/trans_disable.png";
@icon-auto-square-normal-dark: "icon/dark/auto_square_normal.png";
@icon-trans-normal-dark: "icon/dark/trans_normal.png"; @icon-trans-normal-dark: "icon/dark/trans_normal.png";
@icon-trans-select-dark: "icon/dark/trans_select.png"; @icon-trans-select-dark: "icon/dark/trans_select.png";
@icon-trans-disable-dark: "icon/dark/trans_disable.png"; @icon-trans-disable-dark: "icon/dark/trans_disable.png";

14
src/less/resource/background.less

@ -318,7 +318,11 @@
} }
.auto-color-normal-disabled-background { .auto-color-normal-disabled-background {
.image2xPath(@background-auto-color-normal-disabled); .image2xPath(@background-auto-color-disabled);
}
.auto-color-square-normal-background {
.image2xPath(@background-auto-color-square-normal);
} }
.trans-color-background { .trans-color-background {
@ -343,7 +347,13 @@
.auto-color-normal-disabled-background { .auto-color-normal-disabled-background {
&.hack{ &.hack{
.imagePath(@background-auto-color-normal-disabled); .imagePath(@background-auto-color-disabled);
}
}
.auto-color-square-normal-background {
&.hack{
.imagePath(@background-auto-color-square-normal);
} }
} }

7
src/less/resource/icon.less

@ -26,8 +26,10 @@
.icon_hover(slider-icon, @icon-slider-normal, @icon-slider-active); .icon_hover(slider-icon, @icon-slider-normal, @icon-slider-active);
//颜色自动、透明 //颜色自动、透明
.icon_select(auto-color-icon, @icon-auto-normal, @icon-auto-select, @icon-auto-disable); .icon_select(auto-color-icon, @icon-auto-normal, @icon-auto-select);
.icon_select(trans-color-icon, @icon-trans-normal, @icon-trans-select, @icon-trans-disable); .icon_select(trans-color-icon, @icon-trans-normal, @icon-trans-select);
// 方形的自动
.icon(auto-square-color-icon, @icon-auto-square-normal);
.bi-theme-dark { .bi-theme-dark {
.icon(tree-collapse-icon-type1, @icon-tree-collapse-type1-theme-dark); .icon(tree-collapse-icon-type1, @icon-tree-collapse-type1-theme-dark);
@ -43,4 +45,5 @@
.icon(tree-vertical-line-type4, @icon-tree-vertical-line-4-theme-dark); .icon(tree-vertical-line-type4, @icon-tree-vertical-line-4-theme-dark);
.icon_select(trans-color-icon, @icon-trans-normal-dark, @icon-trans-select-dark, @icon-trans-disable-dark); .icon_select(trans-color-icon, @icon-trans-normal-dark, @icon-trans-select-dark, @icon-trans-disable-dark);
.icon(auto-square-color-icon, @icon-auto-square-normal-dark);
} }
Loading…
Cancel
Save