feat: 增加 ShowSearch 属性

This commit is contained in:
Argo Zhang 2020-01-22 22:19:56 +08:00
parent 65fda668bf
commit 301565d8c8
No known key found for this signature in database
GPG Key ID: 152E398953DDF19F
2 changed files with 38 additions and 13 deletions

View File

@ -2,7 +2,8 @@
@inherits TableBase<TItem>
<div class="bootstrap-table">
<div class="@(ShowToolBar ? "bs-bars" : "bs-bars d-none")">
<div class="fixed-table-toolbar">
<div class="float-left @(ShowToolBar ? "bs-bars" : "bs-bars d-none")">
<TableToolbar>
<TableToolbarContent />
<TableToolbarButton class="btn btn-success" Icon="fa fa-plus" Title="新增" OnClick="Add" />
@ -11,6 +12,22 @@
@TableToolbarTemplate
</TableToolbar>
</div>
<div class="float-right @(ShowSearch ? "search btn-group" : "search btn-group d-none")">
<div class="input-group">
<input class="form-control search-input" type="text" placeholder="搜索" data-original-title="" title="">
<div class="input-group-append">
<button class="btn btn-secondary" type="button" name="search" title="搜索">
<i class="fa fa-search"></i><span>搜索</span>
</button>
<button class="btn btn-secondary" type="button" name="clearSearch" title="清空过滤">
<i class="fa fa-trash"></i> <span>清空过滤</span>
</button><button class="btn btn-secondary" type="button" name="advancedSearch" title="高级搜索">
<i class="fa fa-search-plus"></i><span>高级搜索</span>
</button>
</div>
</div>
</div>
</div>
<div class="@(FixedHeader ? "table-wrapper table-fixed-header" : "table-wrapper")">
@if(FixedHeader)
@ -36,7 +53,7 @@
</thead>
</table>
</div>
<div class="fixed-table-body invisible">
<div class="fixed-table-body visible">
<table class="table table-bordered table-hover table-selected" id="@RetrieveId()">
<thead>
<tr>

View File

@ -105,10 +105,6 @@ nav .dropdown .nav-link-close.dropdown-toggle:after {
vertical-align: text-bottom;
}
.card-body .bootstrap-table {
margin-top: 0rem;
}
.bs-bars {
margin-bottom: 0.625rem;
}
@ -130,6 +126,18 @@ nav .dropdown .nav-link-close.dropdown-toggle:after {
margin-bottom: 0;
}
.bootstrap-table .fixed-table-toolbar:after {
display: block;
content: "";
clear: both;
}
.bootstrap-table .fixed-table-toolbar .bs-bars,
.bootstrap-table .fixed-table-toolbar .search,
.bootstrap-table .fixed-table-toolbar .columns {
margin-top: 10px;
}
.bootstrap-table .fixed-table-header {
overflow: hidden;
}