Browse Source

Pull request #3088: REPORT-80245 fix: jquery低版本漏洞

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'bccb48ae7671479f5b084aae16a89b38d049754b':
  REPORT-80245 fix: jquery低版本漏洞
  无JIRA feat: 处理单选和复选场景valueFormatter统一
es6
Dailer-刘荣歆 2 years ago
parent
commit
e51823bec7
  1. 15
      src/case/trigger/trigger.text.select.js
  2. 17
      src/core/platform/web/jquery/_jquery.js

15
src/case/trigger/trigger.text.select.js

@ -52,17 +52,18 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
_digest: function (val, items) { _digest: function (val, items) {
var o = this.options; var o = this.options;
// 提升valueFormatter的优先级
if (o.valueFormatter !== BI.emptyFn && BI.isFunction(o.valueFormatter)) {
return {
text: o.valueFormatter(val),
};
}
val = BI.isArray(val) ? val.slice() : [val]; val = BI.isArray(val) ? val.slice() : [val];
var result = []; var result = [];
// 提升valueFormatter的优先级
if (o.valueFormatter !== BI.emptyFn && BI.isFunction(o.valueFormatter)) {
BI.each(val, function (index, v) {
result.push(o.valueFormatter(v));
});
return result.join(",");
}
var formatItems = BI.Tree.transformToArrayFormat(items); var formatItems = BI.Tree.transformToArrayFormat(items);
BI.each(formatItems, function (i, item) { BI.each(formatItems, function (i, item) {
if (BI.contains(val, item.value) && !BI.contains(result, item.text || item.value)) { if (BI.contains(val, item.value) && !BI.contains(result, item.text || item.value)) {

17
src/core/platform/web/jquery/_jquery.js vendored

@ -10357,20 +10357,27 @@
function createStandardXHR() { function createStandardXHR() {
try { try {
return new window.XMLHttpRequest(); return new window.XMLHttpRequest();
} catch ( e ) {} } catch (e) {
}
} }
function createActiveXHR() { function createActiveXHR() {
try { try {
return new window.ActiveXObject( "Microsoft.XMLHTTP" ); return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch ( e ) {} } catch (e) {
}
} }
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
jQuery.ajaxPrefilter(function (s) {
if (s.crossDomain) {
s.contents.script = false;
}
});
// Install script dataType // Install script dataType
jQuery.ajaxSetup( { jQuery.ajaxSetup({
accepts: { accepts: {
script: "text/javascript, application/javascript, " + script: "text/javascript, application/javascript, " +
"application/ecmascript, application/x-ecmascript" "application/ecmascript, application/x-ecmascript"

Loading…
Cancel
Save