BootStrap Table data-show-refresh图标偏小-求大神帮忙解决

t69490741 2018-03-13 03:46:36

谁能知道这是什么情况?高度只有28px;旁边的高度都是34;
是不是哪个属性设置不对?
html 如下

<div class="container col-md-11">
<table class="table table-striped" id="raDeviceList" align="center"
striped="true" data-click-to-select="true"
data-toolbar="#ratoolbar"<%--设置装按钮的容器为id为toolbar--%>
data-pagination="true"<%--设置是否显示页码数--%>
data-show-refresh="true" <%--设置刷新按钮--%>
data-showColumns="true">
</table>
</div>


JS参数如下

$('#raDeviceList').bootstrapTable({
//是否显示行间隔色
striped: true,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache: false,
//是否显示分页(*)
pagination: true,
//是否启用排序
sortable: false,
//排序方式
sortOrder: "asc",
//每页的记录行数(*)
pageSize: 8,
//可供选择的每页的行数(*)
pageList: [10, 25, 50, 100],
//是否显示搜索
search: true,
//是否显示列头
showHeader: true,
// 显示下拉框勾选要显示的列
showColumns : true,
//data:json,
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
url: "/realAlarm/selectRealAlarmInfo",
contentType: "application/x-www-form-urlencoded",//必须要有!!!!
method: 'post', //请求方式(*)
dataType: "json",
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
/*queryParamsType: 'limit',//查询参数组织方式
queryParams: roleQueryParams,*/
//分页方式:client客户端分页,server服务端分页(*)
sidePagination: "client",
locale: 'zh-CN',//中文支持
/* toolbar: '#toolbar',//指定工作栏*/
columns: raTableColumns,
});
...全文
787 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengyezi159 2018-09-17
  • 打赏
  • 举报
回复
使用了一种低效的方法解决该问题,找到刷新按钮是如下定义的
<button class="btn btn-default" type="button" name="refresh" aria-label="refresh" title="Refresh"><i class="glyphicon glyphicon-refresh icon-refresh"></i></button>
然后按照如下方法进行格式设置
//1、获取所有button对象
var button = document.getElementsByTagName("button");
//2、遍历这些对象找到name是“refresh”的对象
//3、给该对象设置唯一的id然后利用js中的方法给这个id的对象设置高度、宽度即可
for(i=0;i<button.length;i++){
if(button[i].name=='refresh'){
button[i].id = 'toolbar_refresh';
document.getElementById('toolbar_refresh').style.height=34;
document.getElementById('toolbar_refresh').style.width=52;
}
}
Sunyiban 2018-03-13
  • 打赏
  • 举报
回复
这好像就是个图片把,你换个尺寸的呗

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧