Browse Source

Merge pull request #238972 in DEC/fineui from bugfix/11.0 to release/11.0

* commit '1af0e5c851be71eeedf52fa26eff2e55c88887cf':
  auto upgrade version to 2.0.20230518101454
  JSY-29426 fix:绑定空值时与刷新后展示不同
  auto upgrade version to 2.0.20230515174710
  auto upgrade version to 2.0.20230510152618
  BI-126227 feat: 图标更新
  auto upgrade version to 2.0.20230508171534
  auto upgrade version to 2.0.20230508162556
  auto upgrade version to 2.0.20230508154454
  BI-126057: 图标更新
  REPORT-80311 fix: 给一下默认值
  auto upgrade version to 2.0.20230508111614
  auto upgrade version to 2.0.20230504111630
  auto upgrade version to 2.0.20230426103404
  BI-124907 fix: 下拉无选项
  auto upgrade version to 2.0.20230425185447
  无JIRA任务  bugfix
  auto upgrade version to 2.0.20230418112647
  auto upgrade version to 2.0.20230417193702
  auto upgrade version to 2.0.20230414203733
research/test
superman 2 years ago
parent
commit
1ae7ef9714
  1. 2
      package.json
  2. 14
      src/case/combo/textvaluecombo/popup.textvalue.js
  3. 12
      src/widget/intervalslider/intervalslider.js

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20230413101426", "version": "2.0.20230518101454",
"description": "fineui", "description": "fineui",
"main": "dist/fineui_without_conflict.min.js", "main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

14
src/case/combo/textvaluecombo/popup.textvalue.js

@ -1,4 +1,4 @@
BI.TextValueComboPopup = BI.inherit(BI.Pane, { BI.TextValueComboPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-icon-popup", baseCls: "bi-text-icon-popup",
@ -15,17 +15,20 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
vgap: 5, vgap: 5,
items: [ items: [
{ {
type: "bi.button_group", type: "bi.list_pane",
ref: (_ref) => { ref: (_ref) => {
this.popup = _ref; this.popup = _ref;
}, },
items: this._formatItems(o.items), items: this._formatItems(o.items),
el: {
type: "bi.button_group",
chooseType: o.chooseType, chooseType: o.chooseType,
layouts: [ layouts: [
{ {
type: "bi.vertical" type: "bi.vertical"
} }
], ],
},
value: o.value, value: o.value,
listeners: [ listeners: [
{ {
@ -131,12 +134,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
}; };
}, },
beforeMount: function () {
if (this.options.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) {
this.check();
}
},
_formatItems: function (items) { _formatItems: function (items) {
var o = this.options; var o = this.options;
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
@ -150,7 +147,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
}, },
populate: function (items) { populate: function (items) {
BI.TextValueComboPopup.superclass.populate.apply(this, arguments);
this.popup.populate(this._formatItems(items)); this.popup.populate(this._formatItems(items));
}, },

12
src/widget/intervalslider/intervalslider.js

@ -103,7 +103,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
var oldValueTwo = self.valueTwo; var oldValueTwo = self.valueTwo;
var v = BI.parseFloat(this.getValue()); var v = BI.parseFloat(this.getValue());
self.valueTwo = v; self.valueTwo = v;
var percent = self._getPercentByValue(v); var percent = self._getPercentByValue(v, true);
var significantPercent = BI.parseFloat(percent.toFixed(1)); var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderTwoPosition(significantPercent); self._setSliderTwoPosition(significantPercent);
self._setBlueTrack(); self._setBlueTrack();
@ -381,7 +381,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
_setBlueTrack: function () { _setBlueTrack: function () {
var percentOne = this._getPercentByValue(this.labelOne.getValue()); var percentOne = this._getPercentByValue(this.labelOne.getValue());
var percentTwo = this._getPercentByValue(this.labelTwo.getValue()); var percentTwo = this._getPercentByValue(this.labelTwo.getValue(), true);
if (percentOne <= percentTwo) { if (percentOne <= percentTwo) {
this._setBlueTrackLeft(percentOne); this._setBlueTrackLeft(percentOne);
this._setBlueTrackWidth(percentTwo - percentOne); this._setBlueTrackWidth(percentTwo - percentOne);
@ -435,7 +435,11 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
}, },
_getPercentByValue: function (v) { _getPercentByValue: function (v, isLast) {
if (this.max === this.min) {
return isLast ? 100 : 0;
}
return (v - this.min) * 100 / (this.max - this.min); return (v - this.min) * 100 / (this.max - this.min);
}, },
@ -545,7 +549,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) { if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {
this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit)); this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));
this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit)); this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));
this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo)); this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo, true));
} else { } else {
this.labelOne.setValue(this.min); this.labelOne.setValue(this.min);
this.labelTwo.setValue(this.max); this.labelTwo.setValue(this.max);

Loading…
Cancel
Save