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 '删除';
}
}]
};