若依(ruoyi)的前端基于Bootstrap的轻量级表格插件 BootstrapTable 实现的表格。因此使用BootstrapTable修改列宽的方法即可。
经过网上检索,BootstrapTable提供的width属性定制列宽无效。需要使用其它方法。
目前找到了2个可行的方法:
.W120 .th-inner {
width:120px !important;
}
.W80 .th-inner {
width:80px !important;
}
.W60 .th-inner {
width:60px !important;
}
.W150 .th-inner {
width:150px !important;
}
{
class: 'W120',
field: 'buyTime',
title: '购买时间'
}
配置 columns 时,使用formatter格式化值的内容。
{
field: 'buyTime',
title: '购买时间',
formatter: function (value, row, index) {
return '<div style="width:400px;">'+value+'</div>';
}
}
注意:用span套不行,用div套可以
https://blog.csdn.net/u013194063/article/details/79671773
https://www.cnblogs.com/suitao/p/8306349.html
https://blog.csdn.net/a854517900/article/details/83062274
本文地址:https://blog.csdn.net/sayyy/article/details/107483936
如对本文有疑问, 点击进行留言回复!!
bootstrapValidator自定义验证规则,修改触发事件
给 bootstrap-datetimepicker 添加清除按钮
bootstrapvalidator验证两次输入的密码是否一致
bootstrapvalidator调用后台一般处理程序交互验证remote
JQuery的datetimepicker插件,限制开始时间小于等于结束时间的方法
BootstrapValidator . select 必须选择一个 .callback . select .option
网友评论