@ -24,6 +24,7 @@ export class ColorChooser extends Widget {
height: 24,
el: {},
simple: false,
colorItems: null,
});
}
@ -62,6 +63,7 @@ export class ColorChooser extends Widget {
el: extend(
{
type: HexColorChooserPopup.xtype,
colorItems: o.colorItems,
recommendColorsGetter: o.recommendColorsGetter,
ref: _ref => {
this.colorPicker = _ref;
@ -47,6 +47,7 @@ export class HexColorChooserPopup extends Widget {
width: 300,
recommendColorsGetter: emptyFn, // 推荐色获取接口
simple: false, // 简单模式, popup中没有自动和透明
};
render() {
@ -167,6 +168,7 @@ export class HexColorChooserPopup extends Widget {
type: HexColorPicker.xtype,
space: true,
value: o.value,
items: o.colorItems,
listeners: [
eventName: ColorPicker.EVENT_CHANGE,
@ -5,6 +5,10 @@ export declare class ColorChooser extends Widget {
static EVENT_CHANGE: string;
static EVENT_AFTER_POPUPVIEW: string;
props: {
colorItems?: { value: string }[][];
isViewVisible(): boolean;
hideView(): void;