view-ui-plus
Version:
A high quality UI components Library with Vue.js 3
32 lines (30 loc) • 776 B
JavaScript
import { h } from 'vue';
export default {
name: 'TableSlot',
inject: ['TableInstance'],
props: {
row: Object,
index: Number,
column: {
type: Object,
default: null
},
display: {
type: String,
default: 'block'
}
},
render () {
return h('div', {
'class': {
'ivu-table-cell-slot': true,
'ivu-table-cell-slot-inline': this.display === 'inline',
'ivu-table-cell-slot-inline-block': this.display === 'inline-block'
}
}, this.TableInstance.$slots[this.column.slot]({
row: this.row,
column: this.column,
index: this.index
}));
}
};