From b5f6f89cfe08ec69c7e4bf26b9fef0a0945247ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsin@users.noreply.github.com> Date: Tue, 18 May 2021 21:53:51 +0800 Subject: [PATCH] update --- src/modules/table.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/table.js b/src/modules/table.js index 8f91ea33c..b72d7592f 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -949,7 +949,8 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){ if(!options.totalRow) return; layui.each(data, function(i1, item1){ - if(item1.length === 0) return; + //若数据项为空数组,则不往下执行(因为删除数据时,会将原有数据设置为 []) + if(layui._typeof(item1) === 'array' && item1.length === 0) return; that.eachCols(function(i3, item3){ var field = item3.field || i3