<!-- <el-table :data="tableData" style="width: 100%">
<template v-for="(column, index) in columnsConfig">
<el-table-column :key="index" v-if="!isAllNull(column.dataKey)" :prop="column.dataKey" :label="column.label" :width="column.width" />
</template> -->
<!-- </el-table> -->
computed: {
// isAllNull() {
// return function (key) {
// return this.tableData.every(item => item[key] === null);
// }
// }
},
v-if和v-for不能同时使用怎么办+计算属性如何传参
最新推荐文章于 2024-07-26 14:03:04 发布
本文介绍了如何在Vue项目中使用el-table组件展示数据,特别关注了如何动态绑定数据和配置列,以及计算属性isAllNull的实现方法。
1375





