Browse Source

Merge pull request #478 in VISUAL/fineui from ~TELLER/fineui:bugfix/BI-23990 to master

* commit 'b88b8a9eae898eadfd810bfa2dda00e11be1d463':
  update
  update
  update
  update
  update
es6
imp 7 years ago
parent
commit
854995c2dc
  1. 14
      dist/_fineui.min.js
  2. 5
      dist/base.css
  3. 11
      dist/base.js
  4. 73
      dist/bundle.css
  5. 17
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 30
      dist/bundle.min.js
  8. 73
      dist/fineui.css
  9. 17
      dist/fineui.js
  10. 2
      dist/fineui.min.css
  11. 23
      dist/fineui.min.js
  12. 4
      dist/widget.js
  13. 9
      src/base/formula/formulaeditor.js
  14. 5
      src/css/base/formula/formulaeditor.css
  15. 5
      src/less/base/formula/formulaeditor.less

14
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/base.css vendored

@ -701,10 +701,11 @@ li.CodeMirror-hint-active {
color: white; color: white;
} }
.bi-formula-editor .error-field { .bi-formula-editor .error-field {
color: #ff4949; display: inline-block;
background: #ff4949;
color: #ffffff;
padding: 0 5px; padding: 0 5px;
margin: 1px 1px; margin: 1px 1px;
display: inline-block;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;

11
dist/base.js vendored

@ -3594,7 +3594,7 @@ BI.Expander = BI.inherit(BI.Widget, {
} }
}); });
break; break;
default : case "click":
if (e) { if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.expander.element.__isMouseInBounds__(e)) { if (self.expander.element.__isMouseInBounds__(e)) {
@ -14643,15 +14643,14 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/** /**
* 添加字段 * 添加字段
* @param fieldName
* @param fieldId * @param fieldId
*/ */
insertField: function (fieldName, fieldId) { insertField: function (fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId; var value = fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName); var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) { var showName = fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2); return str.substring(2, str.length - 2);
}); });
this.editor.replaceSelection("\u200b" + showName + "\u200b"); this.editor.replaceSelection("\u200b" + showName + "\u200b");

73
dist/bundle.css vendored

@ -1081,30 +1081,41 @@ textarea {
.bi-list-item-select.button-warning.active.bi-high-light-border { .bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050; border-color: #e85050;
} }
.bi-list-item-select.disabled, .bi-list-item-select.disabled {
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
color: #9ea6b2 !important; color: #9ea6b2 !important;
background-color: transparent !important; background-color: transparent !important;
} }
.bi-list-item-select.disabled .bi-input, .bi-list-item-select.disabled .bi-input {
.bi-list-item-select.disabled:hover .bi-input,
.bi-list-item-select.disabled:active .bi-input {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled .bi-textarea, .bi-list-item-select.disabled .bi-textarea {
.bi-list-item-select.disabled:hover .bi-textarea,
.bi-list-item-select.disabled:active .bi-textarea {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled .bi-high-light, .bi-list-item-select.disabled .bi-high-light {
.bi-list-item-select.disabled:hover .bi-high-light,
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled.bi-high-light-border, .bi-list-item-select.disabled.bi-high-light-border {
.bi-list-item-select.disabled:hover.bi-high-light-border, border-color: #F0F3F7;
.bi-list-item-select.disabled:active.bi-high-light-border { }
.bi-list-item-select.disabled.hover,
.bi-list-item-select.disabled.active {
color: #ffffff !important;
background-color: #d0d4da !important;
}
.bi-list-item-select.disabled.hover .bi-input,
.bi-list-item-select.disabled.active .bi-input {
color: #ffffff !important;
}
.bi-list-item-select.disabled.hover .bi-textarea,
.bi-list-item-select.disabled.active .bi-textarea {
color: #ffffff !important;
}
.bi-list-item-select.disabled.hover .bi-high-light,
.bi-list-item-select.disabled.active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.hover.bi-high-light-border,
.bi-list-item-select.disabled.active.bi-high-light-border {
border-color: #F0F3F7; border-color: #F0F3F7;
} }
.bi-list-item-select2:hover, .bi-list-item-select2:hover,
@ -1113,7 +1124,7 @@ textarea {
} }
.bi-list-item-select2:active, .bi-list-item-select2:active,
.bi-list-item-select2.active { .bi-list-item-select2.active {
color: #3685f2; color: #ffffff;
background-color: #f7f8fa; background-color: #f7f8fa;
} }
.bi-list-item-select2:active .bi-input, .bi-list-item-select2:active .bi-input,
@ -1124,6 +1135,10 @@ textarea {
.bi-list-item-select2.active .bi-textarea { .bi-list-item-select2.active .bi-textarea {
color: #3685f2; color: #3685f2;
} }
.bi-list-item-select2:active .bi-high-light,
.bi-list-item-select2.active .bi-high-light {
color: #ffffff;
}
.bi-theme-dark .bi-list-item-select:hover, .bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover { .bi-theme-dark .bi-list-item-select.hover {
color: #ffffff; color: #ffffff;
@ -1781,9 +1796,9 @@ textarea {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset; box-shadow: 0px 0px 2px 1px #d0d4da inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; -webkit-box-shadow: 0px 0px 2px 1px #d0d4da inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -moz-box-shadow: 0px 0px 2px 1px #d0d4da inset;
} }
.bi-color-picker-button .color-picker-button-mask { .bi-color-picker-button .color-picker-button-mask {
border: 1px solid #232e40; border: 1px solid #232e40;
@ -2474,10 +2489,11 @@ li.CodeMirror-hint-active {
color: white; color: white;
} }
.bi-formula-editor .error-field { .bi-formula-editor .error-field {
color: #ff4949; display: inline-block;
background: #ff4949;
color: #ffffff;
padding: 0 5px; padding: 0 5px;
margin: 1px 1px; margin: 1px 1px;
display: inline-block;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;
@ -2557,17 +2573,20 @@ li.CodeMirror-hint-active {
.bi-rich-editor-text-toolbar .text-toolbar-button { .bi-rich-editor-text-toolbar .text-toolbar-button {
font-size: 16px; font-size: 16px;
} }
.bi-segment-button {
color: #3685f2;
}
.bi-segment > .center-element { .bi-segment > .center-element {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden; overflow-y: hidden;
background: #ffffff; background: #ffffff;
border-right: 1px solid #e8eaed; border-right: 1px solid #3685f2;
border-top: 1px solid #e8eaed; border-top: 1px solid #3685f2;
border-bottom: 1px solid #e8eaed; border-bottom: 1px solid #3685f2;
} }
.bi-segment > .first-element { .bi-segment > .first-element {
border-left: 1px solid #e8eaed; border-left: 1px solid #3685f2;
-webkit-border-radius: 6px 0px 0px 6px; -webkit-border-radius: 6px 0px 0px 6px;
-moz-border-radius: 6px 0px 0px 6px; -moz-border-radius: 6px 0px 0px 6px;
border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px;
@ -2577,6 +2596,10 @@ li.CodeMirror-hint-active {
-moz-border-radius: 0px 6px 6px 0px; -moz-border-radius: 0px 6px 6px 0px;
border-radius: 0px 6px 6px 0px; border-radius: 0px 6px 6px 0px;
} }
.bi-segment.disabled > .center-element,
.bi-segment.disabled > .first-element {
border-color: #F0F3F7;
}
.bi-theme-dark .bi-segment > .center-element { .bi-theme-dark .bi-segment > .center-element {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;

17
dist/bundle.js vendored

@ -39365,7 +39365,7 @@ BI.Expander = BI.inherit(BI.Widget, {
} }
}); });
break; break;
default : case "click":
if (e) { if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.expander.element.__isMouseInBounds__(e)) { if (self.expander.element.__isMouseInBounds__(e)) {
@ -50414,15 +50414,14 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/** /**
* 添加字段 * 添加字段
* @param fieldName
* @param fieldId * @param fieldId
*/ */
insertField: function (fieldName, fieldId) { insertField: function (fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId; var value = fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName); var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) { var showName = fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2); return str.substring(2, str.length - 2);
}); });
this.editor.replaceSelection("\u200b" + showName + "\u200b"); this.editor.replaceSelection("\u200b" + showName + "\u200b");
@ -84289,7 +84288,7 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-segment-button bi-list-item-active", baseCls: (conf.baseCls || "") + " bi-segment-button bi-list-item-select",
shadow: true, shadow: true,
readonly: true, readonly: true,
hgap: 5 hgap: 5
@ -105852,7 +105851,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-expander", baseCls: "bi-select-tree-expander",
trigger: "click", trigger: "",
toggle: true, toggle: true,
direction: "bottom", direction: "bottom",
isDefaultInit: true, isDefaultInit: true,
@ -105865,7 +105864,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
BI.SelectTreeExpander.superclass._init.apply(this, arguments); BI.SelectTreeExpander.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.trigger = BI.createWidget(BI.extend({stopPropagation: true}, o.el)); this.trigger = BI.createWidget(o.el);
this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) { this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
if (this.isSelected()) { if (this.isSelected()) {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

73
dist/fineui.css vendored

@ -1081,30 +1081,41 @@ textarea {
.bi-list-item-select.button-warning.active.bi-high-light-border { .bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050; border-color: #e85050;
} }
.bi-list-item-select.disabled, .bi-list-item-select.disabled {
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
color: #9ea6b2 !important; color: #9ea6b2 !important;
background-color: transparent !important; background-color: transparent !important;
} }
.bi-list-item-select.disabled .bi-input, .bi-list-item-select.disabled .bi-input {
.bi-list-item-select.disabled:hover .bi-input,
.bi-list-item-select.disabled:active .bi-input {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled .bi-textarea, .bi-list-item-select.disabled .bi-textarea {
.bi-list-item-select.disabled:hover .bi-textarea,
.bi-list-item-select.disabled:active .bi-textarea {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled .bi-high-light, .bi-list-item-select.disabled .bi-high-light {
.bi-list-item-select.disabled:hover .bi-high-light,
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important; color: #9ea6b2 !important;
} }
.bi-list-item-select.disabled.bi-high-light-border, .bi-list-item-select.disabled.bi-high-light-border {
.bi-list-item-select.disabled:hover.bi-high-light-border, border-color: #F0F3F7;
.bi-list-item-select.disabled:active.bi-high-light-border { }
.bi-list-item-select.disabled.hover,
.bi-list-item-select.disabled.active {
color: #ffffff !important;
background-color: #d0d4da !important;
}
.bi-list-item-select.disabled.hover .bi-input,
.bi-list-item-select.disabled.active .bi-input {
color: #ffffff !important;
}
.bi-list-item-select.disabled.hover .bi-textarea,
.bi-list-item-select.disabled.active .bi-textarea {
color: #ffffff !important;
}
.bi-list-item-select.disabled.hover .bi-high-light,
.bi-list-item-select.disabled.active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.hover.bi-high-light-border,
.bi-list-item-select.disabled.active.bi-high-light-border {
border-color: #F0F3F7; border-color: #F0F3F7;
} }
.bi-list-item-select2:hover, .bi-list-item-select2:hover,
@ -1113,7 +1124,7 @@ textarea {
} }
.bi-list-item-select2:active, .bi-list-item-select2:active,
.bi-list-item-select2.active { .bi-list-item-select2.active {
color: #3685f2; color: #ffffff;
background-color: #f7f8fa; background-color: #f7f8fa;
} }
.bi-list-item-select2:active .bi-input, .bi-list-item-select2:active .bi-input,
@ -1124,6 +1135,10 @@ textarea {
.bi-list-item-select2.active .bi-textarea { .bi-list-item-select2.active .bi-textarea {
color: #3685f2; color: #3685f2;
} }
.bi-list-item-select2:active .bi-high-light,
.bi-list-item-select2.active .bi-high-light {
color: #ffffff;
}
.bi-theme-dark .bi-list-item-select:hover, .bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover { .bi-theme-dark .bi-list-item-select.hover {
color: #ffffff; color: #ffffff;
@ -1781,9 +1796,9 @@ textarea {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;
border-radius: 2px; border-radius: 2px;
box-shadow: 0px 0px 2px 1px #d4dadd inset; box-shadow: 0px 0px 2px 1px #d0d4da inset;
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset; -webkit-box-shadow: 0px 0px 2px 1px #d0d4da inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset; -moz-box-shadow: 0px 0px 2px 1px #d0d4da inset;
} }
.bi-color-picker-button .color-picker-button-mask { .bi-color-picker-button .color-picker-button-mask {
border: 1px solid #232e40; border: 1px solid #232e40;
@ -2474,10 +2489,11 @@ li.CodeMirror-hint-active {
color: white; color: white;
} }
.bi-formula-editor .error-field { .bi-formula-editor .error-field {
color: #ff4949; display: inline-block;
background: #ff4949;
color: #ffffff;
padding: 0 5px; padding: 0 5px;
margin: 1px 1px; margin: 1px 1px;
display: inline-block;
} }
.bi-message-title { .bi-message-title {
font-size: 14px; font-size: 14px;
@ -2557,17 +2573,20 @@ li.CodeMirror-hint-active {
.bi-rich-editor-text-toolbar .text-toolbar-button { .bi-rich-editor-text-toolbar .text-toolbar-button {
font-size: 16px; font-size: 16px;
} }
.bi-segment-button {
color: #3685f2;
}
.bi-segment > .center-element { .bi-segment > .center-element {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;
overflow-y: hidden; overflow-y: hidden;
background: #ffffff; background: #ffffff;
border-right: 1px solid #e8eaed; border-right: 1px solid #3685f2;
border-top: 1px solid #e8eaed; border-top: 1px solid #3685f2;
border-bottom: 1px solid #e8eaed; border-bottom: 1px solid #3685f2;
} }
.bi-segment > .first-element { .bi-segment > .first-element {
border-left: 1px solid #e8eaed; border-left: 1px solid #3685f2;
-webkit-border-radius: 6px 0px 0px 6px; -webkit-border-radius: 6px 0px 0px 6px;
-moz-border-radius: 6px 0px 0px 6px; -moz-border-radius: 6px 0px 0px 6px;
border-radius: 6px 0px 0px 6px; border-radius: 6px 0px 0px 6px;
@ -2577,6 +2596,10 @@ li.CodeMirror-hint-active {
-moz-border-radius: 0px 6px 6px 0px; -moz-border-radius: 0px 6px 6px 0px;
border-radius: 0px 6px 6px 0px; border-radius: 0px 6px 6px 0px;
} }
.bi-segment.disabled > .center-element,
.bi-segment.disabled > .first-element {
border-color: #F0F3F7;
}
.bi-theme-dark .bi-segment > .center-element { .bi-theme-dark .bi-segment > .center-element {
overflow: hidden; overflow: hidden;
overflow-x: hidden; overflow-x: hidden;

17
dist/fineui.js vendored

@ -39614,7 +39614,7 @@ BI.Expander = BI.inherit(BI.Widget, {
} }
}); });
break; break;
default : case "click":
if (e) { if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) { self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.expander.element.__isMouseInBounds__(e)) { if (self.expander.element.__isMouseInBounds__(e)) {
@ -50663,15 +50663,14 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/** /**
* 添加字段 * 添加字段
* @param fieldName
* @param fieldId * @param fieldId
*/ */
insertField: function (fieldName, fieldId) { insertField: function (fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId; var value = fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName); var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) { var showName = fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2); return str.substring(2, str.length - 2);
}); });
this.editor.replaceSelection("\u200b" + showName + "\u200b"); this.editor.replaceSelection("\u200b" + showName + "\u200b");
@ -84538,7 +84537,7 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-segment-button bi-list-item-active", baseCls: (conf.baseCls || "") + " bi-segment-button bi-list-item-select",
shadow: true, shadow: true,
readonly: true, readonly: true,
hgap: 5 hgap: 5
@ -106101,7 +106100,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-expander", baseCls: "bi-select-tree-expander",
trigger: "click", trigger: "",
toggle: true, toggle: true,
direction: "bottom", direction: "bottom",
isDefaultInit: true, isDefaultInit: true,
@ -106114,7 +106113,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
BI.SelectTreeExpander.superclass._init.apply(this, arguments); BI.SelectTreeExpander.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.trigger = BI.createWidget(BI.extend({stopPropagation: true}, o.el)); this.trigger = BI.createWidget(o.el);
this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) { this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
if (this.isSelected()) { if (this.isSelected()) {

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

23
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/widget.js vendored

@ -18164,7 +18164,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-tree-expander", baseCls: "bi-select-tree-expander",
trigger: "click", trigger: "",
toggle: true, toggle: true,
direction: "bottom", direction: "bottom",
isDefaultInit: true, isDefaultInit: true,
@ -18177,7 +18177,7 @@ BI.SelectTreeExpander = BI.inherit(BI.Widget, {
BI.SelectTreeExpander.superclass._init.apply(this, arguments); BI.SelectTreeExpander.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
this.trigger = BI.createWidget(BI.extend({stopPropagation: true}, o.el)); this.trigger = BI.createWidget(o.el);
this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) { this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) { if (type === BI.Events.CLICK) {
if (this.isSelected()) { if (this.isSelected()) {

9
src/base/formula/formulaeditor.js

@ -120,15 +120,14 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
/** /**
* 添加字段 * 添加字段
* @param fieldName
* @param fieldId * @param fieldId
*/ */
insertField: function (fieldName, fieldId) { insertField: function (fieldId) {
var value = this.options.fieldTextValueMap[fieldName] || fieldId; var value = fieldId;
var fieldFormattedName = this.options.paramFormatter(fieldName); var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = BI.isNull(fieldFormattedName) ? "undefined" : fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) { var showName = fieldFormattedName.replaceAll(/^<!.*!>$/, function (str) {
return str.substring(2, str.length - 2); return str.substring(2, str.length - 2);
}); });
this.editor.replaceSelection("\u200b" + showName + "\u200b"); this.editor.replaceSelection("\u200b" + showName + "\u200b");

5
src/css/base/formula/formulaeditor.css

@ -1,6 +1,7 @@
.bi-formula-editor .error-field { .bi-formula-editor .error-field {
color: #ff4949; display: inline-block;
background: #ff4949;
color: #ffffff;
padding: 0 5px; padding: 0 5px;
margin: 1px 1px; margin: 1px 1px;
display: inline-block;
} }

5
src/less/base/formula/formulaeditor.less

@ -2,9 +2,10 @@
.bi-formula-editor { .bi-formula-editor {
& .error-field { & .error-field {
color: @color-bi-text-failure; display: inline-block;
background: @color-bi-background-failure;
color: @font-color-white;
padding: 0 5px; padding: 0 5px;
margin: 1px 1px; margin: 1px 1px;
display: inline-block;
} }
} }

Loading…
Cancel
Save