Browse Source

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

* commit 'a387fa98c073d2f9af2008802a5860f6f0e9a52f':
  update
es6
Teller 6 years ago
parent
commit
e289085c0b
  1. 13
      dist/base.js
  2. 13
      dist/bundle.js
  3. 14
      dist/bundle.min.js
  4. 13
      dist/fineui.js
  5. 27
      dist/fineui.min.js
  6. 13
      src/base/formula/formulaeditor.js

13
dist/base.js vendored

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

13
dist/bundle.js vendored

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

14
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

13
dist/fineui.js vendored

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

27
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

13
src/base/formula/formulaeditor.js

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

Loading…
Cancel
Save