修复 table 通过 `init` 转换的表格头部的 `colspan` 和 `rowspan` 的默认值问题

pull/1309/head
sunxiaobin89 2023-07-17 22:42:02 +08:00
parent d49ad48c2b
commit 37ab1fb585
1 changed files with 2 additions and 2 deletions

View File

@ -2559,8 +2559,8 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
var row = $.extend({ var row = $.extend({
title: th.text() title: th.text()
,colspan: parseInt(th.attr('colspan')) || 0 //列单元格 ,colspan: parseInt(th.attr('colspan')) || 1 //列单元格
,rowspan: parseInt(th.attr('rowspan')) || 0 //行单元格 ,rowspan: parseInt(th.attr('rowspan')) || 1 //行单元格
}, itemData); }, itemData);
options.cols[i].push(row); options.cols[i].push(row);