
像这样的表格我们可以这样划分一下区域:
直接上代码:
{{ scope.row[column.prop] }} {{ getStatusLabel(row.status) }} 批准 拒绝 const tableColumns = [ { id: 0, type: 'index', align: 'center', width: '55' }, { id: 1, label: '姓名', prop: 'name' }, { id: 2, label: '学号', prop: 'studentId' }, { id: 3, label: '邮箱', prop: 'email' }, { id: 4, label: '专业', prop: 'profession' }, { id: 5, label: '意愿部门', prop: 'department' }, { id: 6, label: '自我介绍', prop: 'introduction', width: '200' }, { id: 7, label: '是否通过', prop: 'status', type: 'tag' }, { id: 8, label: '操作', prop: 'operate', width: '180' } ]; // 注意观察 // 1. 子组件的 `default.${column.prop}` // 2. 父组件的 #default.operate="{ row }" // 3. 数据的 prop 的属性值 就这么简单!其他功能自行拓展即可,欢迎三连,谢谢