<el-table ref="multipleTable" :data="tableDataNo" tooltip-effect="dark" :class="tableHeaderUpOn == '展开' ? 'hideScrollNode' : ''" >
<el-table-column type="selection" width="60" align="center"> </el-table-column>
<el-table-column :label="未学习">
<template slot="header" slot-scope="scope">
<i :class="tableHeaderUpOn == '展开' ? 'el-icon-caret-right' : 'el-icon-caret-bottom' " @click="tableDataNoClick"></i> {{'未学习'}}
</template>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" :content="scope.row.ruleName" placement="top">
<div style="cursor:pointer;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" @click="gotoBasisListAdd(scope.row)">
{{scope.row.ruleName}}
</div>
</el-tooltip>
<div>
<el-row>
<el-col :span="6" style="padding-right:5px;">
<div>职务岗位:{{scope.row.jobPosition}}</div>
</el-col>
<el-col :span="6" style="padding-right:5px;">
<div>清单分类:{{scope.row.comName}}</div>
</el-col>
</el-row>
</div>
</template>
</el-table-column>
</el-table>
tableDataNo: [
{
id: 30,
ruleName: "sidjfaoiund",
jobPosition: "dsagddsfgv",
comName: "dsafsdfds",
createTime: "sdafds",
learningState: "sdzfdsf",
},
],
tableHeaderUpOn: "展开",
tableDataNoClick() {
if (this.tableHeaderUpOn == "展开") {
this.tableHeaderUpOn = "收起"
} else {
this.tableHeaderUpOn = "展开"
}
},
<style>
.hideScrollNode .is-scrolling-none {
display: none;
}
</style>
完结
补充:
<el-table-column
label="全选"
:render-header="(h, obj) => renderHeader(h, obj, '确定')"
style="display: inline"
> </el-table-column>
// 自定义列名
renderHeader(h, { column, $index }, type) {
let that = this;
return h("div", [
// 列名称
h("span", column.label),
// 按钮
h(
"el-button",
{
props: {
type: "primary",
// size: 'small',
},
class: "el-icon-download",
style: "margin-left: 15px;background:#169BD5;width:136px;",
on: {
click: function () {
// that.clickButton(type);
},
},
},
"批量下载"
),
]);
},
clickButton(){
},
原文地址:https://blog.csdn.net/ingenuou_/article/details/128115723
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_24316.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。