layui table option里的button 跟行错位
在done 里添加这段代码就行了
var dataTable = table.render({ elem: '#dataTable' // ,height: 500 ,fixed:'left' ,cellMinWidth: 200 ,url: "{{ route('admin.data') }}" //数据接口 ,where:{model:"order_purchase"} ,page: true //开启分页 ,limit : 20 ,loading : true ,cols: [[ //表头 {checkbox: true} ,{field: 'purchase_order_no', title: '合同信息',templet:'#orderTpl',width: 180,event :'removeTips'} ,{field: 'supplier_name', title: '供应商',templet:'#supplierTpl',width: 220,class:'t1',event :'removeTips'} ,{field: 'prod', title: '产品信息', templet:'#prodTpl',event :'removeTips',valign:'top'} ,{field: 'pack', title: '订购信息', templet:'#packTpl',event :'removeTips'} ,{field: 'price', title: '合同金额',templet:'#priceTpl', event :'removeTips'} ,{field: 'send', title: '发货信息',templet:"#sendTpl", event :'removeTips'} /*,{field: 'invoice', title: '发票信息',templet:"#invoiceTpl",width: 160,event :'removeTips'}*/ ,{field: 'status', title: '状态',templet:"#statusTpl", width: 80, event :'removeTips'} //,{field: 'manage', title: '跟单员',templet:"#manageTpl",width: 80,event :'removeTips'} //,{field: 'time', title: '签约时间',templet:'#timeTpl',event :'removeTips'} ,{fixed: 'right', width: 80, align:'center',title: '操作', toolbar: '#options'} ]], done:function () { $(".layui-table-main tr").each(function (index ,val) { $($(".layui-table-fixed .layui-table-body tbody tr")[index]).height($(val).height()); }); } });