From 9ef49086623c9c8e2d92a33517c28c59b4b12709 Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 20 Sep 2022 17:06:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=20feat:=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=8D=95=E9=80=89=E5=92=8C=E5=A4=8D=E9=80=89=E5=9C=BA=E6=99=AF?= =?UTF-8?q?valueFormatter=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/trigger/trigger.text.select.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/case/trigger/trigger.text.select.js b/src/case/trigger/trigger.text.select.js index cf1e2cdd9..005ac241b 100644 --- a/src/case/trigger/trigger.text.select.js +++ b/src/case/trigger/trigger.text.select.js @@ -52,17 +52,18 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, { _digest: function (val, items) { 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]; 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); BI.each(formatItems, function (i, item) { if (BI.contains(val, item.value) && !BI.contains(result, item.text || item.value)) { From bccb48ae7671479f5b084aae16a89b38d049754b Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 20 Sep 2022 17:11:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-80245=20fix:=20jquery=E4=BD=8E?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=BC=8F=E6=B4=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/platform/web/jquery/_jquery.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/core/platform/web/jquery/_jquery.js b/src/core/platform/web/jquery/_jquery.js index 0c7f0479e..9888c50f7 100644 --- a/src/core/platform/web/jquery/_jquery.js +++ b/src/core/platform/web/jquery/_jquery.js @@ -10357,20 +10357,27 @@ function createStandardXHR() { try { return new window.XMLHttpRequest(); - } catch ( e ) {} + } catch (e) { + } } function createActiveXHR() { try { - return new window.ActiveXObject( "Microsoft.XMLHTTP" ); - } catch ( e ) {} + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } 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 - jQuery.ajaxSetup( { + jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, " + "application/ecmascript, application/x-ecmascript"