欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

元素Ui 自定义表头,根据判断显示不同的表头

最编程 2024-07-11 11:23:01
...

一、根据tabIndex变量值,显示不同的表头header

二、代码

<el-table-column min-width="220" show-overflow-tooltip>
		<template slot="header" slot-scope="scope">
				{{tabIndex==1?'表头栏目1':'表头栏目222'}}
		</template>
		<template slot-scope="scope">
				{{scope.row.content}}
		</template>
</el-table-column>

推荐阅读