谁能知道这是什么情况?高度只有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,
    });

解决方案 »

  1.   

    使用了一种低效的方法解决该问题,找到刷新按钮是如下定义的
    <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;
          }
       }