Browse Source

Merge pull request #495 in VISUAL/fineui from ~LEI.WANG/fineui:master to master

* commit 'b2e88c48cbf479a46661601db35a716c91e8ee11':
  BI-26037
  BI-26037 r语言编辑器不需要分析匹配,容易与R语言的语法冲突
es6
imp 6 years ago
parent
commit
205c82db15
  1. 44
      dist/_fineui.min.js
  2. 12
      dist/base.js
  3. 12
      dist/bundle.js
  4. 10
      dist/bundle.min.js
  5. 12
      dist/fineui.js
  6. 44
      dist/fineui.min.js
  7. 9
      src/base/single/editor/editor.code.js

44
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

12
dist/base.js vendored

@ -18123,6 +18123,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2,
readOnly: false,
lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数
paramFormatter: function (v) {
return v;
@ -18135,7 +18136,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
lineNumbers: o.lineNumbers,
readOnly: o.readOnly,
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
@ -18276,9 +18277,10 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
setValue: function (v) {
var self = this, result;
var self = this, o = this.options, result;
this.refresh();
self.editor.setValue("");
if(o.paramMatch) {
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -18289,6 +18291,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item);
}
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark();
},
@ -18319,7 +18324,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/**
BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15.
* @class BI.Editor
* @extends BI.Single

12
dist/bundle.js vendored

@ -53894,6 +53894,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2,
readOnly: false,
lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数
paramFormatter: function (v) {
return v;
@ -53906,7 +53907,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
lineNumbers: o.lineNumbers,
readOnly: o.readOnly,
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
@ -54047,9 +54048,10 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
setValue: function (v) {
var self = this, result;
var self = this, o = this.options, result;
this.refresh();
self.editor.setValue("");
if(o.paramMatch) {
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -54060,6 +54062,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item);
}
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark();
},
@ -54090,7 +54095,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/**
BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15.
* @class BI.Editor
* @extends BI.Single

10
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

12
dist/fineui.js vendored

@ -54143,6 +54143,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2,
readOnly: false,
lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数
paramFormatter: function (v) {
return v;
@ -54155,7 +54156,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
lineNumbers: o.lineNumbers,
readOnly: o.readOnly,
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
@ -54296,9 +54297,10 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
setValue: function (v) {
var self = this, result;
var self = this, o = this.options, result;
this.refresh();
self.editor.setValue("");
if(o.paramMatch) {
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -54309,6 +54311,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item);
}
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark();
},
@ -54339,7 +54344,8 @@ BI.CodeEditor = BI.inherit(BI.Single, {
BI.CodeEditor.EVENT_CHANGE = "EVENT_CHANGE";
BI.CodeEditor.EVENT_BLUR = "EVENT_BLUR";
BI.CodeEditor.EVENT_FOCUS = "EVENT_FOCUS";
BI.shortcut("bi.code_editor", BI.CodeEditor);/**
BI.shortcut("bi.code_editor", BI.CodeEditor);
/**
* Created by GUY on 2015/4/15.
* @class BI.Editor
* @extends BI.Single

44
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

9
src/base/single/editor/editor.code.js

@ -13,6 +13,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
lineHeight: 2,
readOnly: false,
lineNumbers: false,
paramMatch: true, // 用来判断是否需要在代码中匹配参数,默认为true, R语言是不需要匹配参数
// 参数显示值构造函数
paramFormatter: function (v) {
return v;
@ -25,7 +26,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
var conf = {
textWrapping: true,
lineWrapping: true,
lineNumbers: false,
lineNumbers: o.lineNumbers,
readOnly: o.readOnly,
// 解决插入字段由括号或其他特殊字符包围时分裂的bug
specialChars: /[\u0000-\u001f\u007f\u00ad\u200c-\u200f\u2028\u2029\ufeff]/
@ -166,9 +167,10 @@ BI.CodeEditor = BI.inherit(BI.Single, {
},
setValue: function (v) {
var self = this, result;
var self = this, o = this.options, result;
this.refresh();
self.editor.setValue("");
if(o.paramMatch) {
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
@ -179,6 +181,9 @@ BI.CodeEditor = BI.inherit(BI.Single, {
self.insertString(item);
}
});
}else {
self.editor.setValue(v);
}
this._checkWaterMark();
},

Loading…
Cancel
Save