Commit bbbc711d by 李长胜

允许border有无,增加表头样式,增加表格无数据的情况

1 parent a8727f10
......@@ -6,12 +6,13 @@
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
border
:border="border"
:highlight-current-row="true"
:stripe="true"
@sort-change="sortChange"
@selection-change="handleSelect"
:size="size"
:header-cell-style="headerStyle"
>
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
......@@ -90,6 +91,11 @@
></slot>
</template>
</el-table-column>
<div slot="empty" class="emptyBg">
<img class="noDataImg" :src="noDataImg" v-if=noDataImg alt="" />
<p>{{noDataText}}</p>
<slot name="additionalContent"></slot>
</div>
</el-table>
<el-pagination
v-if="hasPage"
......@@ -127,6 +133,22 @@ export default {
type: String,
default: 'medium'
},
noDataImg:{
type:String,
default:''
},
noDataText:{
type:String,
default:'暂无数据'
},
border: {
type: Boolean,
default: false
},
headerStyle: {
type: Object,
default: () => {}
},
// 搜索条件
searchForm: {
type: Object,
......@@ -342,4 +364,13 @@ export default {
padding-left: 14px!important;
padding-right: 14px!important;
}
.glsx-table .emptyBg .noDataImg{
display: inline-block;
margin-top: 150px;
height: 100%;
}
.glsx-table .emptyBg p{
margin-top: -20px;
height: 100%;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!