From 311cb892a721cbca8e61519ef35963811b98b10d Mon Sep 17 00:00:00 2001 From: William Chen Date: Mon, 23 Jan 2023 22:19:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=95=E4=BD=93=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=A1=A8=E6=A0=BC=E8=A1=8C=E6=8B=96=E6=8B=BD=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E5=90=8E=EF=BC=8C=E5=88=97=E8=A1=A8=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E7=9A=84=E6=80=BB=E5=85=B1=E8=AE=B0=E5=BD=95=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E5=8F=98=E6=88=90=E4=BA=86undefined=E9=97=AE=E9=A2=98=E3=80=82?= =?UTF-8?q?=20link=20https://gitee.com/y=5Fproject/RuoYi/issues/I68198?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/demo/table/reorderRows.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/reorderRows.html b/ruoyi-admin/src/main/resources/templates/demo/table/reorderRows.html index e788ccbd..197db801 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/table/reorderRows.html +++ b/ruoyi-admin/src/main/resources/templates/demo/table/reorderRows.html @@ -32,13 +32,16 @@ showRefresh: false, showToggle: false, showColumns: false, - onReorderRow: function (data) { - //当拖拽结束后,data为整个表格的数据 - console.table(data) - // 当sidePagination: "server"时,拖拽行后顺序错乱,需要重新调用加载数据方法 - $("#" + table.options.id).bootstrapTable('load', data); - return false; - }, + onReorderRow: function (data, newRow, oldRow, el) { + //当拖拽结束后,data为整个表格的数据 + console.table(data) + // 当sidePagination: "server"时,拖拽行后顺序错乱,需要重新调用加载数据方法 + $("#" + table.options.id).bootstrapTable('load', { + total: el._xhr.responseJSON.total, + rows: data + }); + return false; + }, columns: [{ checkbox: true },