Layui 设置数据表格列宽自适应
主要代码
cols: [[
{field:‘theDate’, width:‘10%’, title: ‘提货日期’,align:‘center’,unresize:true}
,{field:‘goodsId’, width:‘10%’, title: ‘商品Id’, align:‘center’}
,{field:‘goodsName’, width:‘30%’, title: ‘商品名称’, align:‘center’}
,{field:‘lineName’, width:‘10%’, title: ‘线路’, align:‘center’}
,{field:‘tranName’, width:‘10%’, title: ‘服务站’, align:‘center’}
,{field:‘wareHouse’, width:‘10%’, title: ‘所属仓库’, align:‘center’}
,{field:‘factSaleNum’, width:‘10%’, title: ‘实际销售数量’, align:‘center’}
,{field:‘returnNum’, width:‘10%’,title: ‘退货数量’, align:‘center’}
]],
done: function (res, curr, count){
$(“table”).css(“width”, “100%”);
//这里设置表格的宽度为100%
},

相关文章:

  • 2022-01-05
  • 2021-10-19
  • 2021-12-01
  • 2021-09-23
  • 2022-12-23
  • 2022-02-18
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
相关资源
相似解决方案