我的开发前提是vue+Elment UI的背景
要实现如下图这种
这个水印挡住了,差不多就是这样左边标题右边按钮,我也是搞了很久才找到这种,如果你想要整个标题头就是按钮那种就不用看这篇文章了,一搜一大堆
我直接上代码
<!-- 表头 -->
<template slot="header" header="scope">
<span>{{ "信息:" + subBureau }} </span>
<span @click="bureauBtn">选择分局</span>
</template>
<!-- 按钮 -->
<template #default="scope" class="subBureau-cls">
<div>
{{ scope.row.xxxxxxx}}
</div>
</template>
格式大概都是这样,然后内容自定义,有什么问题欢迎评论区留言