element-ui下表格头部字段hover显示tips信息

记录一下表格头部加hover之后显示tips信息
循环,或单独的el-table-column都可以哦

 

<el-table-column
            prop="name"
            :render-header="renderTip"
            label="签约人"
            width="180">

 

renderTip(h, { column }) {
            const inReview = '需要进行线下发放的奖品项数!'
            return h('div', [
                h('span', column.label),
                h(
                'el-tooltip',
                {
                    props: {
                    effect: 'dark',
                    placement: 'top'
                    }
                },
                [
                    h('div', {
                    slot: 'content',
                    style: {
                        'max-width': '250px',
                        whiteSpace: 'normal',
                    }
                    }, inReview),
                    h('i', {
                    class: 'el-icon-question',
                    style: 'color:#409eff;margin-left:5px; font-size:18px;vertical-align: -0.125em;'
                    })
                ]
                )
            ])
        },
 

 https://blog.csdn.net/qq_39762109/article/details/127584634

 

posted @ 2023-02-16 15:54  未几  阅读(224)  评论(0)    收藏  举报