gpt4 book ai didi

javascript - Bootgrid 刷新按钮大小不合适

转载 作者:行者123 更新时间:2023-11-28 07:25:06 24 4
gpt4 key购买 nike

我正在使用bootstrapjquery bootgrid ,首先一切都好。然后我开始了一个新项目并在那里使用了 bootgrid 。我发现一个奇怪的事情:在网格的控制面板上,刷新按钮比其他按钮小。但我没有改变bootgrid中的任何配置,都是默认的。

enter image description here

为什么会这样以及如何解决它?这个按钮是自动生成的,我不知道...

UPD

JS:

$(function () {
var autoOutGrig = $("#autoOutGrig").bootgrid({
navigation: 3,
ajax: true,
url: "controllers/getListFiles",
post: function () {
return {
type: 'req',
expanded: $('#exp').text()
};
},
responseHandler: function (response)
{
return response.data;
}
});

HTML:

<div id="autoOut" class="tab-pane fade in active">
<span id="exp" style="display: none;"></span>
<h3>Auto OUT</h3>
<table id="autoOutGrig" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="date" class="col-md-3">Дата/Время</th>
<th data-column-id="expander" data-formatter="expander" class="col-md-1">Список</th>
<th data-column-id="file" class="col-md-4">Имя файла</th>
<th data-column-id="uid" class="col-md-4">UID</th>
<th data-column-id="accReqId" class="col-md-2">AccountsRequestId</th>
<!-- <th data-column-id="respType" class="col-md-2">Тип ответа</th>
<th data-column-id="respName" class="col-md-2">Имя ответа</th>-->
</tr>
</thead>
</table>
</div>

UPD:来自 chrome 检查的样式。

enter image description here

UPD2:下面答案中的代码在我的服务器上不起作用。但它在堆栈片段集上运行良好!

<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.css" rel="stylesheet"/>
<link href="http://cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.css" rel="stylesheet"/>

<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.js"></script>


<script>
$(function () {
var testGrid = $("#testGrid").bootgrid({
navigation: 3,
ajax: true,
url: "controllers/getListFiles",
post: function () {
return {
type: 'req',
expanded: $('#exp').text()
};
},
responseHandler: function (response)
{
return response.data;
}
});
});
</script>



<div id="autoOut" class="tab-pane fade in active">
<span id="exp" style="display: none;"></span>
<h3>Auto OUT</h3>
<table id="testGrid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="date" class="col-md-3">Дата/Время</th>
<th data-column-id="expander" data-formatter="expander" class="col-md-1">Список</th>
<th data-column-id="file" class="col-md-4">Имя файла</th>
<th data-column-id="uid" class="col-md-4">UID</th>
<th data-column-id="accReqId" class="col-md-2">AccountsRequestId</th>
</tr>
</thead>
</table>
</div>

最佳答案

我会确保您为您的项目引入最新的 CSS 库

使用您提供的代码似乎可以正常工作:

$(function () {
var autoOutGrig = $("#autoOutGrig").bootgrid({
navigation: 3,
ajax: true,
url: "controllers/getListFiles",
post: function () {
return {
type: 'req',
expanded: $('#exp').text()
};
},
responseHandler: function (response)
{
return response.data;
}
});
});
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.css" rel="stylesheet"/>
<link href="//cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.css" rel="stylesheet"/>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.js"></script>


<div id="autoOut" class="tab-pane fade in active">
<span id="exp" style="display: none;"></span>
<h3>Auto OUT</h3>
<table id="autoOutGrig" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="date" class="col-md-3">Дата/Время</th>
<th data-column-id="expander" data-formatter="expander" class="col-md-1">Список</th>
<th data-column-id="file" class="col-md-4">Имя файла</th>
<th data-column-id="uid" class="col-md-4">UID</th>
<th data-column-id="accReqId" class="col-md-2">AccountsRequestId</th>
</tr>
</thead>
</table>
</div>

关于javascript - Bootgrid 刷新按钮大小不合适,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29766365/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com