Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit '96e9ae1aa1ae5d26a73a51439cd3ba7b780a4fbf':
  auto upgrade version to 2.0.20220614151423
  auto upgrade version to 2.0.20220614150529
  auto upgrade version to 2.0.20220614142259
  BI-107724 style:bi-tips在深色模式下的颜色
  无JIRA fix: 解决复选下拉框时序不一致问题
  无JIRA fix: 解决复选下拉框时序不一致问题
  无JIRA fix: 解决复选下拉框时序不一致问题
  feature: searcher只使能最后一次搜索的值
  auto upgrade version to 2.0.20220613220728
  无JIRA  fix: 解决复选下拉框时序不一致问题
  auto upgrade version to 2.0.20220613171343
  DESIGN-3918 feat: toast 最小宽度
  bufix: vertical支持horizontalAlign设置
  auto upgrade version to 2.0.20220613151327
  feature: vertical支持horizontalAlign设置
  无jira任务 提供样式设置
es6
windy 2 years ago
parent
commit
f1ad8ab39b
  1. 2
      package.json
  2. 2
      src/base/combination/searcher.js
  3. 2
      src/base/single/tip/tip.toast.js
  4. 1
      src/case/colorchooser/colorchooser.js
  5. 2
      src/case/colorchooser/colorchooser.simple.js
  6. 19
      src/core/platform/web/config.js
  7. 12
      src/less/core/utils/common.less
  8. 5
      src/widget/multiselect/trigger/button.checkselected.js
  9. 8
      src/widget/multiselect/trigger/searcher.multiselect.insert.js
  10. 11
      src/widget/multiselect/trigger/searcher.multiselect.js

2
package.json

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

2
src/base/combination/searcher.js

@ -183,7 +183,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
keyword: keyword,
selectedValues: o.adapter && o.adapter.getValue()
}, function (searchResult, matchResult) {
if (!self._stop) {
if (!self._stop && keyword === self.editor.getValue()) {
var args = [].slice.call(arguments);
if (args.length > 0) {
args.push(keyword);

2
src/base/single/tip/tip.toast.js

@ -8,7 +8,7 @@
BI.Toast = BI.inherit(BI.Tip, {
_const: {
closableMinWidth: 146,
minWidth: 124,
minWidth: 100,
closableMaxWidth: 410,
maxWidth: 400,
hgap: 8

1
src/case/colorchooser/colorchooser.js

@ -13,6 +13,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
value: "",
height: 24,
el: {},
simple: false
});
},

2
src/case/colorchooser/colorchooser.simple.js

@ -62,4 +62,4 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
});
BI.SimpleColorChooser.EVENT_CHANGE = "EVENT_CHANGE";
BI.SimpleColorChooser.EVENT_AFTER_POPUPVIEW = "EVENT_AFTER_POPUPVIEW";
BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser);
BI.shortcut("bi.simple_color_chooser", BI.SimpleColorChooser);

19
src/core/platform/web/config.js

@ -45,6 +45,25 @@ BI.prepares.push(function () {
scrollx: true
}, ob, {type: "bi.inline"});
});
BI.Plugin.configWidget("bi.vertical", function (ob) {
if (ob.horizontalAlign === BI.HorizontalAlign.Left || ob.horizontalAlign === BI.HorizontalAlign.Right) {
if (isSupportFlex()) {
return BI.extend({}, ob, {type: "bi.flex_vertical"});
}
return BI.extend({}, ob, {
horizontalAlign: BI.HorizontalAlign.Stretch,
type: "bi.vertical",
items: BI.map(ob.items, function (i, item) {
return {
type: "bi.inline",
horizontalAlign: ob.horizontalAlign,
items: [item]
};
})
});
}
return ob;
});
BI.Plugin.configWidget("bi.inline", function (ob) {
// 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧
var hasAutoAndFillColumnSize = false;

12
src/less/core/utils/common.less

@ -175,6 +175,18 @@
}
}
.bi-theme-dark {
.bi-tips {
color: @color-bi-text-tips-theme-dark;
& .bi-input {
color: @color-bi-text-tips-theme-dark;;
}
& .bi-textarea {
color: @color-bi-text-tips-theme-dark;
}
}
}
// 边框
.bi-border {
border: 1px solid @color-bi-border-line;

5
src/widget/multiselect/trigger/button.checkselected.js

@ -40,7 +40,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
self.numberCounter.setText(self.numberCounter.getTag());
});
this.setVisible(false);
if(BI.isNotNull(o.value)){
if (BI.isNotNull(o.value)) {
this.setValue(o.value);
}
},
@ -51,6 +51,9 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
if (self.options.value.type !== BI.Selection.All) {
return;
}
if (BI.isNotEmptyString(res.count)) {
BI.nextTick(function () {
self.numberCounter.setText(res.count);

8
src/widget/multiselect/trigger/searcher.multiselect.insert.js

@ -63,7 +63,11 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
var keyword = self.editor.getKeyword();
op.keywords = [keyword];
this.setKeyword(keyword);
o.itemsCreator(op, callback);
o.itemsCreator(op, function () {
if (keyword === self.editor.getValue()) {
callback.apply(null, arguments);
}
});
},
itemHeight: o.itemHeight,
value: o.value,
@ -174,7 +178,7 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {
}
},
getState: function() {
getState: function () {
return this.editor.getState();
},

11
src/widget/multiselect/trigger/searcher.multiselect.js

@ -51,7 +51,6 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
callback();
},
el: this.editor,
popup: BI.extend({
type: "bi.multi_select_search_pane",
valueFormatter: o.valueFormatter,
@ -61,7 +60,15 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
itemsCreator: function (op, callback) {
var keyword = self.editor.getValue();
op.keywords = [keyword];
o.itemsCreator(op, callback);
o.itemsCreator(op, function () {
var keyword = self.editor.getValue();
op.keywords = [keyword];
o.itemsCreator(op, function () {
if (keyword === self.editor.getValue()) {
callback.apply(null, arguments);
}
});
});
},
itemHeight: o.itemHeight,
value: o.value

Loading…
Cancel
Save