bklLiudl
2025-04-02 1bbbbc8bb49411b544626996a1370788142300e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
export default {
    name: 'TableSlot',
    functional: true,
    inject: ['tableRoot'],
    props: {
        row: Object,
        index: Number,
        column: {
            type: Object,
            default: null
        },
        display: {
            type: String,
            default: 'block'
        }
    },
    render: (h, ctx) => {
        return h('div', {
            'class': {
                'ivu-table-cell-slot': true,
                'ivu-table-cell-slot-inline': ctx.props.display === 'inline',
                'ivu-table-cell-slot-inline-block': ctx.props.display === 'inline-block'
            }
        }, ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot]({
            row: ctx.props.row,
            column: ctx.props.column,
            index: ctx.props.index
        }));
    }
};