Browse Source

Pull request #145920: REPORT-78579 fix: 调整bi.time_combo组件结构,保持结构统一

Merge in DEC/fineui from ~KITETOP/fineui:final/11.0 to final/11.0

* commit 'f001f4d9a133a3a35f28801b90ea160ced941f79':
  REPORT-78579 fix: 调整bi.time_combo组件结构,保持结构统一
research/test
Kitetop 2 years ago
parent
commit
f1ef0ad48e
  1. 54
      src/widget/time/time.combo.js

54
src/widget/time/time.combo.js

@ -60,19 +60,20 @@
} }
}; };
return { return {
type: "bi.horizontal_fill", type: "bi.absolute",
cls: "bi-border bi-border-radius",
columnSize: ["fill", this.constants.iconWidth],
height: opts.height - 2,
width: opts.width - 2,
items: [{ items: [{
el: { el: {
type: "bi.combo", type: "bi.combo",
cls: "bi-border bi-border-radius",
container: opts.container, container: opts.container,
toggle: false, toggle: false,
isNeedAdjustHeight: opts.isNeedAdjustHeight, isNeedAdjustHeight: opts.isNeedAdjustHeight,
isNeedAdjustWidth: opts.isNeedAdjustWidth, isNeedAdjustWidth: opts.isNeedAdjustWidth,
el: { el: {
type: "bi.horizontal_fill",
columnSize: ["fill", this.constants.iconWidth],
height: opts.height - 2,
items: [{
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height - 2, height: opts.height - 2,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
@ -150,6 +151,26 @@
self.fireEvent("EVENT_CONFIRM"); self.fireEvent("EVENT_CONFIRM");
} }
}] }]
}, {
el: {
type: "bi.icon_button",
cls: "bi-trigger-icon-button time-font",
width: this.constants.iconWidth,
listeners: [{
eventName: BI.IconButton.EVENT_CHANGE,
action: function () {
if (self.combo.isViewVisible()) {
// self.combo.hideView();
} else {
self.combo.showView();
}
}
}],
ref: function (_ref) {
self.triggerBtn = _ref;
}
},
}],
}, },
adjustLength: this.constants.comboAdjustHeight, adjustLength: this.constants.comboAdjustHeight,
popup: { popup: {
@ -171,25 +192,10 @@
self.combo = _ref; self.combo = _ref;
} }
}, },
}, { top: 0,
el: { left: 0,
type: "bi.icon_button", right: 0,
cls: "bi-trigger-icon-button time-font", bottom: 0
width: this.constants.iconWidth,
listeners: [{
eventName: BI.IconButton.EVENT_CHANGE,
action: function () {
if (self.combo.isViewVisible()) {
// self.combo.hideView();
} else {
self.combo.showView();
}
}
}],
ref: function (_ref) {
self.triggerBtn = _ref;
}
},
}] }]
}; };
}, },

Loading…
Cancel
Save