iview/src/components/table/expand.js

21 lines
479 B
JavaScript
Raw Normal View History

2017-06-08 08:53:00 +08:00
export default {
name: 'TableExpand',
functional: true,
props: {
row: Object,
render: Function,
index: Number,
2017-06-09 16:44:24 +08:00
column: {
type: Object,
default: null
}
2017-06-08 08:53:00 +08:00
},
render: (h, ctx) => {
2017-06-09 16:44:24 +08:00
const params = {
row: ctx.props.row,
index: ctx.props.index
};
if (ctx.props.column) params.column = ctx.props.column;
return ctx.props.render(h, params);
2017-06-08 08:53:00 +08:00
}
};