element-ui 中表头插入图标
<el-table-column prop="date" label="云账号名称">
<template slot="header" >
<span
>云账号名称
<el-popover
placement="bottom"
width="200"
trigger="click"
content=""
>
<el-input
v-model="search"
placeholder="筛选 云账号名称"
></el-input>
<el-row type="flex" justify="sapce-between">
<el-col
><el-button type="primary" icon="el-icon-search" size="mini"
>搜索</el-button
></el-col
>
<el-col :span="9"></el-col>
<el-col
><el-button type="info" plain size="mini"
>重置</el-button
></el-col
>
</el-row>
<i class="el-icon-search" slot="reference" />
</el-popover>
</span>
</template>
</el-table-column>
效果图
注:popover 弹出框,自带 width 属性, 可在弹出框内添加表格、搜索框等
element-ui 中没有数据时,用图标代替
代码演示
<el-table
border
style="width: 100%; font-size: 12px; font-weight: 400"
:cell-style="{ 'text-algin': 'center' }"
:header-cell-style="{ 'text-align': 'center' }"
>
<template slot="empty">
<img
src="@/assets/images/暂无数据.png"
width="50px"
height="50px"
style="margin-top: 20px"
/>
</template>
<el-table-colum label="名称"/>
</el-table>
效果图