From 53bb1da7a1119dea65a1c47931c09abfe91284ce Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 17 Apr 2022 10:18:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=BB=E5=AD=90=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E5=88=A0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/common.js | 3 +-- .../src/main/resources/templates/demo/table/subdata.html | 3 ++- ruoyi-generator/src/main/resources/vm/html/add.html.vm | 3 ++- ruoyi-generator/src/main/resources/vm/html/edit.html.vm | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index 714719ebc..e3b7a97aa 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -465,9 +465,8 @@ var sub = { } $("#" + table.options.id).bootstrapTable('remove', { field: subColumn, values: ids }); }, - delRowByIndex: function(defindex, index) { + delRowByIndex: function(value) { sub.editRow(); - var value = $.common.isNotEmpty(index) ? index : defindex; $("#" + table.options.id).bootstrapTable('remove', { field: "index", values: [value] }); sub.editRow(); }, diff --git a/ruoyi-admin/src/main/resources/templates/demo/table/subdata.html b/ruoyi-admin/src/main/resources/templates/demo/table/subdata.html index 923393d3e..57a4ade5f 100644 --- a/ruoyi-admin/src/main/resources/templates/demo/table/subdata.html +++ b/ruoyi-admin/src/main/resources/templates/demo/table/subdata.html @@ -171,7 +171,8 @@ title: '操作', align: 'center', formatter: function(value, row, index) { - return '删除'; + var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); + return '删除'; } }] }; diff --git a/ruoyi-generator/src/main/resources/vm/html/add.html.vm b/ruoyi-generator/src/main/resources/vm/html/add.html.vm index 2741be7ec..c64ccd9da 100644 --- a/ruoyi-generator/src/main/resources/vm/html/add.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/add.html.vm @@ -351,7 +351,8 @@ title: '操作', align: 'center', formatter: function(value, row, index) { - return '删除'; + var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); + return '删除'; } }] }; diff --git a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm index bef945c3b..cddfe1d68 100644 --- a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm @@ -363,7 +363,8 @@ title: '操作', align: 'center', formatter: function(value, row, index) { - return '删除'; + var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); + return '删除'; } }] };