/** * * @name: 子表格扩展 * @author: yelog * @link: https://github.com/yelog/layui-soul-table * @license: MIT * @version: v1.6.2 */ layui.define(["table"],function(e){var d=layui.jquery;e("tableMerge",{render:function(n){var e=d(n.elem).next().children(".layui-table-box"),t=d(e.children(".layui-table-body").children("table").children("tbody").children("tr").toArray().reverse()),l=d(e.children(".layui-table-fixed-l").children(".layui-table-body").children("table").children("tbody").children("tr").toArray().reverse()),h=d(e.children(".layui-table-fixed-r").children(".layui-table-body").children("table").children("tbody").children("tr").toArray().reverse()),c={};layui.each(n.cols,function(i,e){layui.each(e,function(e,a){var r;a.merge&&a.field&&(r=[a.field],!0!==a.merge&&(r="string"==typeof a.merge?[a.merge]:a.merge),c[n.index+"-"+i+"-"+e]={mergeField:r,rowspan:1})})}),t.each(function(e){for(var a in c){var r,i;e===t.length-1||function(e,a){for(var r=c[a].mergeField,i=layui.table.cache[n.id].length,t=0;t