Browse Source

Pull request #3660: BI-129568 fix: 白色背景相反色值调整&分页间距优化

Merge in VISUAL/fineui from ~IMP/fineui_fui:master to master

* commit '92ae85eb61c4b48adf203f67b215eb9beb62b908':
  BI-129568 fix: 分页间距优化-先回退6016考虑
  BI-129568 fix: 白色背景相反色值调整&分页间距优化
research/test
imp-张健 1 year ago
parent
commit
584393dfc8
  1. 53
      packages/fineui/src/case/pager/pager.direction.js
  2. 2
      packages/fineui/src/core/utils/color.js

53
packages/fineui/src/case/pager/pager.direction.js

@ -40,6 +40,11 @@ export class DirectionPager extends Widget {
} }
_init() { _init() {
super._init(...arguments); super._init(...arguments);
this.ITEM_GAP = 0;
this.ITEM_WIDTH = this.options.height - 2 * this.ITEM_GAP;
this.MIDDLE_GAP = 16;
this._createVPager(); this._createVPager();
this._createHPager(); this._createHPager();
this.layout = createWidget({ this.layout = createWidget({
@ -49,23 +54,23 @@ export class DirectionPager extends Widget {
items: [ items: [
{ {
el: this.vpager, el: this.vpager,
top: 0, top: this.ITEM_GAP,
right: 86, right: this.ITEM_WIDTH * 3 + this.MIDDLE_GAP,
}, },
{ {
el: this.vlabel, el: this.vlabel,
top: 0, top: this.ITEM_GAP,
right: 110, right: this.ITEM_WIDTH * 4 + this.MIDDLE_GAP,
}, },
{ {
el: this.hpager, el: this.hpager,
top: 0, top: this.ITEM_GAP,
right: 0, right: 0,
}, },
{ {
el: this.hlabel, el: this.hlabel,
top: 0, top: this.ITEM_GAP,
right: 24, right: this.ITEM_WIDTH,
} }
], ],
}); });
@ -75,20 +80,20 @@ export class DirectionPager extends Widget {
const v = this.options.vertical; const v = this.options.vertical;
this.vlabel = createWidget({ this.vlabel = createWidget({
type: Label.xtype, type: Label.xtype,
width: 24, width: this.ITEM_WIDTH,
height: 24, height: this.ITEM_WIDTH,
value: v.curr, value: v.curr,
title: v.curr, title: v.curr,
invisible: true, invisible: true,
}); });
this.vpager = createWidget({ this.vpager = createWidget({
type: Pager.xtype, type: Pager.xtype,
width: 72, width: this.ITEM_WIDTH * 3,
layouts: [ layouts: [
{ {
type: HorizontalLayout.xtype, type: HorizontalLayout.xtype,
scrollx: false, scrollx: false,
rgap: 24, rgap: this.ITEM_WIDTH,
} }
], ],
invisible: true, invisible: true,
@ -105,8 +110,8 @@ export class DirectionPager extends Widget {
value: "prev", value: "prev",
title: i18nText("BI-Up_Page"), title: i18nText("BI-Up_Page"),
warningTitle: i18nText("BI-Current_Is_First_Page"), warningTitle: i18nText("BI-Current_Is_First_Page"),
height: 22, height: this.ITEM_WIDTH - 2,
width: 22, width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2", cls: "bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2",
}, },
next: { next: {
@ -114,8 +119,8 @@ export class DirectionPager extends Widget {
value: "next", value: "next",
title: i18nText("BI-Down_Page"), title: i18nText("BI-Down_Page"),
warningTitle: i18nText("BI-Current_Is_Last_Page"), warningTitle: i18nText("BI-Current_Is_Last_Page"),
height: 22, height: this.ITEM_WIDTH - 2,
width: 22, width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2", cls: "bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2",
}, },
@ -137,20 +142,20 @@ export class DirectionPager extends Widget {
const h = this.options.horizontal; const h = this.options.horizontal;
this.hlabel = createWidget({ this.hlabel = createWidget({
type: Label.xtype, type: Label.xtype,
width: 24, width: this.ITEM_WIDTH,
height: 24, height: this.ITEM_WIDTH,
value: h.curr, value: h.curr,
title: h.curr, title: h.curr,
invisible: true, invisible: true,
}); });
this.hpager = createWidget({ this.hpager = createWidget({
type: Pager.xtype, type: Pager.xtype,
width: 72, width: this.ITEM_WIDTH * 3,
layouts: [ layouts: [
{ {
type: HorizontalLayout.xtype, type: HorizontalLayout.xtype,
scrollx: false, scrollx: false,
rgap: 24, rgap: this.ITEM_WIDTH,
} }
], ],
invisible: true, invisible: true,
@ -167,8 +172,8 @@ export class DirectionPager extends Widget {
value: "prev", value: "prev",
title: i18nText("BI-Left_Page"), title: i18nText("BI-Left_Page"),
warningTitle: i18nText("BI-Current_Is_First_Page"), warningTitle: i18nText("BI-Current_Is_First_Page"),
height: 22, height: this.ITEM_WIDTH - 2,
width: 22, width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2", cls: "bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2",
}, },
next: { next: {
@ -176,8 +181,8 @@ export class DirectionPager extends Widget {
value: "next", value: "next",
title: i18nText("BI-Right_Page"), title: i18nText("BI-Right_Page"),
warningTitle: i18nText("BI-Current_Is_Last_Page"), warningTitle: i18nText("BI-Current_Is_Last_Page"),
height: 22, height: this.ITEM_WIDTH - 2,
width: 22, width: this.ITEM_WIDTH - 2,
cls: "bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2", cls: "bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2",
}, },
@ -260,7 +265,7 @@ export class DirectionPager extends Widget {
vShow = true; vShow = true;
} }
this.setVisible(hShow || vShow); this.setVisible(hShow || vShow);
const num = [86, 110, 0, 24]; const num = [this.ITEM_WIDTH * 3 + this.MIDDLE_GAP, this.ITEM_WIDTH * 4 + this.MIDDLE_GAP, 0, this.ITEM_WIDTH];
const items = this.layout.attr("items"); const items = this.layout.attr("items");
if (vShow === true && hShow === true) { if (vShow === true && hShow === true) {

2
packages/fineui/src/core/utils/color.js

@ -42,7 +42,7 @@ export function getContrastColor(color) {
return "#FFFFFF"; return "#FFFFFF";
} }
return "#3D4D66"; return "#091e40";
} }
export function rgb2hex(rgbColour) { export function rgb2hex(rgbColour) {

Loading…
Cancel
Save