From 1207052749ea6fa85c4bc761bd563fe1a749e2dc Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 19 May 2023 10:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC=E8=A1=8C?= =?UTF-8?q?=E5=86=85=E7=BC=96=E8=BE=91=E5=90=AF=E7=94=A8=E7=BF=BB=E9=A1=B5?= =?UTF-8?q?=E8=AE=B0=E4=BD=8F=E9=80=89=E6=8B=A9=E6=97=A0=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98(I72OMA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extensions/editable/bootstrap-table-editable.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js index f3843ae9a..8bd108f44 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js @@ -26,7 +26,7 @@ $.extend($.fn.bootstrapTable.columnDefaults, { alwaysUseFormatter: false }) -$.extend($.fn.bootstrapTable.Constructor.EVENTS, { +$.extend($.fn.bootstrapTable.events, { 'editable-init.bs.table': 'onEditableInit', 'editable-save.bs.table': 'onEditableSave', 'editable-shown.bs.table': 'onEditableShown', @@ -63,7 +63,7 @@ $.BootstrapTable = class extends $.BootstrapTable { column.formatter = column.formatter || (value => value) column._formatter = column._formatter ? column._formatter : column.formatter - column.formatter = (value, row, index) => { + column.formatter = (value, row, index, field) => { let result = Utils.calculateObjectValue(column, column._formatter, [value, row, index], value) result = typeof result === 'undefined' || result === null ? this.options.undefinedText : result @@ -86,7 +86,7 @@ $.BootstrapTable = class extends $.BootstrapTable { column.editable, [index, row], {}) if (editableOpts.hasOwnProperty('noEditFormatter')) { - noEditFormatter = editableOpts.noEditFormatter(value, row, index) + noEditFormatter = editableOpts.noEditFormatter(value, row, index, field) } if (noEditFormatter === false) { @@ -177,11 +177,13 @@ $.BootstrapTable = class extends $.BootstrapTable { if (params && params.escape) { for (const row of data) { for (const [key, value] of Object.entries(row)) { - row[key] = Utils.unescapeHTML(value) + if (typeof(value) !== "number") { + row[key] = Utils.unescapeHTML(value) + } } } } return data } -} +} \ No newline at end of file