看着table效果不错,文档看着也不错,但是实际查阅起来还是有点不方便,如下列宽怎样实现自动分配让我自己去猜么??猜猜也就算了,应该不设置死宽度可以自动分配。
![](https://img.haomeiwen.com/i11811349/22622bf2d1a289ad.png)
![](https://img.haomeiwen.com/i11811349/678509bd8b99198a.png)
- 但是,这玩意,这样写列宽还是自动分配的
cols: [[
{ field: 'id', title: '题号',}//totalRowText: '合计:'
, { field: 'username', title: '评分依据' }
, {
field: 'email', title: '评分标准', hide: 0, templet: function (x) {
return '<em>123</em>'
}
}
, { field: 'sex', title: '备注' }
, { field: 'city', title: '要求', templet: '#cityTpl1' }
, { field: 'sign', title: '打分' }
, { field: 'experience', title: '意见' }//totalRow: true
, { field: 'ip', title: '项目附件',}
, { field: 'logins', title: '是否一票否决',width:'120' , templet:''}
]],
![](https://img.haomeiwen.com/i11811349/a1a1e8d58974eeb7.png)
- 第一列添加宽度,其他代码不变
, cols: [[
{ field: 'id', title: '题号',width:'100'}//totalRowText: '合计:'
, { field: 'username', title: '评分依据' }
, {
field: 'email', title: '评分标准', hide: 0, templet: function (x) {
return '<em>123</em>'
}
}
, { field: 'sex', title: '备注' }
, { field: 'city', title: '要求', templet: '#cityTpl1' }
, { field: 'sign', title: '打分' }
, { field: 'experience', title: '意见' }//totalRow: true
, { field: 'ip', title: '项目附件',}
, { field: 'logins', title: '是否一票否决',width:'120' , templet:''}
]],
宽度就无法自适应了,什么玩意????
![](https://img.haomeiwen.com/i11811349/931dbda5c6c508f0.png)
天 太垃圾了吧!!!!
网友评论