Reputation: 16513
I thought this would work but it did not:
<template lang="pug">
el-table(:data="myDataSet")
el-table-column
template(slot="label")
el-tooltip(content="Verification of Reference")
| VOR Status
template(slot-scope="props")
| {{ props.row.myData }}
</template>
Please help, thanks.
Upvotes: 2
Views: 5289
Reputation: 31
You can use slot="header"
<el-table-column>
<template
slot="header">
<el-popover
ref="fromPopOver"
placement="top-start"
width="250"
trigger="hover">
<span>
Tooltip info here
</span>
</el-popover>
<span>Destination <i
v-popover:fromPopOver
class="el-icon-info
text-blue" />
</span>
</template>
<template slot-scope="scope">
<span>{{ scope.row.SomeData }}</span>
</template>
Upvotes: 3
Reputation: 26
<el-table-column prop="value"
label="Value"
:render-header="renderPhaseHeader">
</el-table-column>
methods: {
renderPhaseHeader(h, { column }) {
return h('span', {
class: 'class-name-if-you-want'
}, [
column.label + " ",
h('el-tooltip', {
class: 'class-name-if-you-want',
attrs: {
'content': 'message',
'effect': 'light',
'placement': 'top-start'
}
}, [
h('i', {
class: 'far fa-question-circle'
})
])
])
}
}
Upvotes: 1