本人用的boostrap table 在线编辑功能,在一个单元格里面需要使用到搜索Bootstrap Search Suggest,但是在单击这一行之后单元格的宽度就被Suggest撑大,下面放几张图片,跪求大神指点,
自己解决了一天了解决不了,救命啊!
这张图片是没有点击之前的:
这一张图片是点击之后的效果:
这一张是正常的效果的图片:
下面贴出来代码:
$('#xdcfTabmx').bootstrapTable('destroy');
$('#xdcfTabmx').bootstrapTable({
url:"Zdglwh/getmx", //请求url
method: 'POST', //请求方式(*)
//toolbar: '#toolbar', //工具按钮用哪个容器
editable:true,
striped: false, //是否显示行间隔色
cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
contentType: "application/x-www-form-urlencoded",
height: document.body.clientHeight-100,
width:$(window).width(),
sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
queryParams: queryParammx,
singleSelect:false,
clickToSelect: false, //是否启用点击选中行
sortStable:true,
//sortName:"dtKsrq",
//sortOrder: "ASC",
//uniqueId: 'ICfsxh', //将ICfsxh列设为唯一索引
uniqueId: 'ICfsxh', //将ICfsxh列设为唯一索引
silent: true, //刷新事件必须设置
columns: [
{title:'√',checkbox:true},
{title:'助记码',field:'VPydm1',width:50,align:'center',edit:{
type:'bsSuggest',//
url:'Mzgl/getYz?zt=2&cksbh='+$("#cySsyf").val()+'&pydm=',
effectiveFields: ['VPydm','VYpmc','VYpgg','VJldw','NLsj','NHsb','RXcsl'],
searchFields: [],
effectiveFieldsAlias:{VPydm:'助记码',VYpmc:'名称',VYpgg:'规格',
VJldw:'单位',NLsj:'划价单价',NHsb:'换算比',RXcsl:'库存量'},//有效字段别名
idField: 'rowNum',
keyField: 'VPydm',
width:'700px',
autoMinWidth: true,
listAlign: "left",
listStyle: {
"padding-top":0, "max-height": "375px", "max-width": "800px",
"overflow": "auto", "width": "auto",
"transition": "0.3s", "-webkit-transition": "0.3s", "-moz-transition": "0.3s", "-o-transition": "0.3s"
},
onDataRequestSuccess:function(e, result) {
for(var a=0;a<result.value.length;a++){
arr1.push(result.value[a]);
}
},
onSetSelectValue:function (e, keyword, data) {
inputId=e.target.id;
ypkeyword=keyword;
//onMouseDown(1,1);
//$("#RSl").focus().select();
}
}},