From bfa073bfb7632393212737cb925d096d785b595a Mon Sep 17 00:00:00 2001 From: dailer Date: Fri, 25 Aug 2023 09:57:42 +0800 Subject: [PATCH] =?UTF-8?q?BI-131636=20fix:=20=E3=80=906.0.13=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=96=87=E6=A1=A3=E8=BF=AD=E4=BB=A3=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E3=80=91=E5=88=86=E6=9E=90=E6=96=87=E6=A1=A3=EF=BC=8C=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E9=A2=9C=E8=89=B2=E9=BB=98=E8=AE=A4=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E5=B0=91=E4=BA=8616=E8=BF=9B=E5=88=B6=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/case/colorchooser/colorchooser.popup.hex.js | 12 +++++++++--- .../colorpicker/editor.colorpicker.hex.js | 2 +- .../colorpicker/editor.colorpicker.hex.simple.js | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js b/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js index 61a48946f..0a9f9a24c 100644 --- a/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js +++ b/packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js @@ -22,7 +22,13 @@ import { Label, Combo, TextItem } from "@/base"; import { PopupPanel } from "../layer"; import { CustomColorChooser } from "./colorchooser.custom"; import { ColorChooserPopup } from "./colorchooser.popup"; -import { ColorPickerEditor, ColorPicker, HexColorPicker } from "./colorpicker"; +import { + ColorPickerEditor, + ColorPicker, + HexColorPicker, + SimpleHexColorPickerEditor, + HexColorPickerEditor +} from "./colorpicker"; /** * @author windy @@ -59,8 +65,8 @@ export class HexColorChooserPopup extends Widget { extend( { type: o.simple - ? "bi.simple_hex_color_picker_editor" - : "bi.hex_color_picker_editor", + ? SimpleHexColorPickerEditor.xtype + : HexColorPickerEditor.xtype, value: o.value, height: o.simple ? 36 : 70, listeners: [ diff --git a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js index f512888be..25ffb0a2a 100644 --- a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js +++ b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.js @@ -39,7 +39,7 @@ export class HexColorPickerEditor extends Widget { static EVENT_CHANGE = "EVENT_CHANGE"; props = { - baseCls: "bi-color-picker-editor", + baseCls: "bi-color-picker-editor bi-hex-color-picker-editor", height: 30, }; diff --git a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js index 3c13b1aba..14386afac 100644 --- a/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js +++ b/packages/fineui/src/case/colorchooser/colorpicker/editor.colorpicker.hex.simple.js @@ -23,7 +23,8 @@ import { TextEditor } from "@/widget/editor/editor.text"; const RGB_WIDTH = 32, HEX_WIDTH = 70, - HEX_PREFIX_POSITION = 1; + HEX_PREFIX_POSITION = 1, + DEFAULT_HEX = "ffffff"; /** * @author windy @@ -37,7 +38,7 @@ export class SimpleHexColorPickerEditor extends Widget { static EVENT_CHANGE = "EVENT_CHANGE"; props = { - baseCls: "bi-color-picker-editor", + baseCls: "bi-color-picker-editor bi-simple-hex-color-picker-editor", height: 36, }; @@ -112,6 +113,7 @@ export class SimpleHexColorPickerEditor extends Widget { errorText: i18nText("BI-Color_Picker_Error_Text_Hex"), width: HEX_WIDTH, height: 24, + value: DEFAULT_HEX, listeners: [ { eventName: "EVENT_CHANGE",