slot-scope
从 3.2.0 版本开始支持 slot-scope 写法。
在 columns 的某列声明 slot 后,就可以在 Table 的 slot 中使用 slot-scope。
slot-scope 的参数有 3 个:当前行数据 row,当前列数据 column,当前行序号 index。
示例可编辑表格
{ { row.name }}
{ { row.age }}
{ { getBirthday(row.birthday) }}
{ { row.address }}
保存
取消
操作
export default {
data () {
return {
columns: [
{
title: '姓名',
slot: 'name'
},
{
title: '年龄',
slot: 'age'
},
{
title: '出生日期',
slot: 'birthday'
},
{
title: '地址',
slot: 'address'
},
{
title: '