windy 6 years ago
parent
commit
e6836c9352
  1. 4
      dist/base.js
  2. 4
      dist/bundle.js
  3. 2
      dist/bundle.min.js
  4. 4
      dist/fineui.js
  5. 4
      dist/fineui.min.js
  6. 4
      src/base/formula/formulaeditor.js

4
dist/base.js vendored

@ -14651,13 +14651,13 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined"; var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = 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");
var to = this.editor.getCursor(); var to = this.editor.getCursor();
var className = "fieldName"; var className = "fieldName";
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/)) && !force) { if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field"; className = "error-field";
} }
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value}); this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

4
dist/bundle.js vendored

@ -50422,13 +50422,13 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined"; var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = 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");
var to = this.editor.getCursor(); var to = this.editor.getCursor();
var className = "fieldName"; var className = "fieldName";
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/)) && !force) { if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field"; className = "error-field";
} }
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value}); this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

2
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.js vendored

@ -50671,13 +50671,13 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined"; var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = 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");
var to = this.editor.getCursor(); var to = this.editor.getCursor();
var className = "fieldName"; var className = "fieldName";
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/)) && !force) { if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field"; className = "error-field";
} }
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value}); this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

4
dist/fineui.min.js vendored

@ -181,13 +181,13 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined"; var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = 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");
var to = this.editor.getCursor(); var to = this.editor.getCursor();
var className = "fieldName"; var className = "fieldName";
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/)) && !force) { if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field"; className = "error-field";
} }
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value}); this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

4
src/base/formula/formulaeditor.js

@ -128,13 +128,13 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined"; var fieldFormattedName = this.options.paramFormatter(fieldId) || "undefined";
var from = this.editor.getCursor(); var from = this.editor.getCursor();
// 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下 // 解决插入字段由括号或其他特殊字符包围时分裂的bug,在两端以不可见字符包裹一下
var showName = 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");
var to = this.editor.getCursor(); var to = this.editor.getCursor();
var className = "fieldName"; var className = "fieldName";
if (BI.isNotNull(fieldFormattedName.match(/^<!.*!>$/)) && !force) { if (BI.isNotNull(fieldFormattedName.match("^<!.*!>$")) && !force) {
className = "error-field"; className = "error-field";
} }
this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value}); this.editor.markText(from, to, {className: className, atomic: true, startStyle: "start", endStyle: "end", value: value});

Loading…
Cancel
Save