From 7bc2f8f84f1455f93b138a2b6bff12fac6ff0cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 17 Aug 2022 14:36:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20table=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index 25cd0f60..c25fd4bb 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1013,9 +1013,9 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ //遍历表头 that.eachCols(function(i3, item3){ - var field = item3.field || i3 - ,key = options.index + '-' + item3.key - ,content = item1[field]; + var field = item3.field || i3; + var key = options.index + '-' + item3.key; + var content = item1[field]; if(content === undefined || content === null) content = ''; if(item3.colGroup) return; @@ -1023,6 +1023,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ // td 内容 var td = ['