Browse Source

JSY-35428 feat:选色板支持高度props传入

research/test
Claire 11 months ago
parent
commit
78dcc8ad5f
  1. 2
      packages/fineui/src/case/colorchooser/colorchooser.js
  2. 3
      packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js
  3. 5
      packages/fineui/typescript/case/colorchooser/colorchooser.ts

2
packages/fineui/src/case/colorchooser/colorchooser.js

@ -25,6 +25,7 @@ export class ColorChooser extends Widget {
el: {}, el: {},
simple: false, simple: false,
colorItems: null, colorItems: null,
colorBoardHeight: 80,
}); });
} }
@ -64,6 +65,7 @@ export class ColorChooser extends Widget {
{ {
type: HexColorChooserPopup.xtype, type: HexColorChooserPopup.xtype,
colorItems: o.colorItems, colorItems: o.colorItems,
colorBoardHeight: o.colorBoardHeight,
recommendColorsGetter: o.recommendColorsGetter, recommendColorsGetter: o.recommendColorsGetter,
ref: _ref => { ref: _ref => {
this.colorPicker = _ref; this.colorPicker = _ref;

3
packages/fineui/src/case/colorchooser/colorchooser.popup.hex.js

@ -48,6 +48,7 @@ export class HexColorChooserPopup extends Widget {
recommendColorsGetter: emptyFn, // 推荐色获取接口 recommendColorsGetter: emptyFn, // 推荐色获取接口
simple: false, // 简单模式, popup中没有自动和透明 simple: false, // 简单模式, popup中没有自动和透明
colorItems: null, colorItems: null,
colorBoardHeight: 80,
}; };
render() { render() {
@ -189,7 +190,7 @@ export class HexColorChooserPopup extends Widget {
bottom: 1, bottom: 1,
} }
], ],
height: 80, height: o.colorBoardHeight,
} }
], ],
}, },

5
packages/fineui/typescript/case/colorchooser/colorchooser.ts

@ -1,3 +1,4 @@
import { Single } from 'typescript/base/single/single';
import { Widget } from '../../core/widget'; import { Widget } from '../../core/widget';
export declare class ColorChooser extends Widget { export declare class ColorChooser extends Widget {
@ -6,8 +7,10 @@ export declare class ColorChooser extends Widget {
static EVENT_AFTER_POPUPVIEW: string; static EVENT_AFTER_POPUPVIEW: string;
props: { props: {
stopEvent?: boolean;
colorBoardHeight?: number;
colorItems?: { value: string }[][]; colorItems?: { value: string }[][];
}; } & Single["props"];
isViewVisible(): boolean; isViewVisible(): boolean;

Loading…
Cancel
Save