如何向元素ui(vue.js)中的表标题添加工具提示?
我认为这会奏效,但没有:如何向元素ui(vue.js)中的表标题添加工具提示?,vue.js,vuejs2,element-ui,Vue.js,Vuejs2,Element Ui,我认为这会奏效,但没有: <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") | {{ pro
<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>
el表格(:data=“myDataSet”)
el表格列
模板(slot=“label”)
el工具提示(内容=“参考验证”)
|VOR状态
模板(slot scope=“props”)
|{{props.row.myData}
请帮忙,谢谢。
<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'
})
])
])
}
}
方法:{
RenderPaseHeader(h,{column}){
返回h('span'{
class:“如果需要,请使用类名”
}, [
column.label+“”,
h(‘el-tooltip’{
class:“如果需要,请使用类名”,
属性:{
“内容”:“消息”,
“效果”:“光”,
“位置”:“最开始”
}
}, [
h(‘i’{
班级:'远法问题圈'
})
])
])
}
}
您可以使用slot=“header”
工具提示信息在这里
目的地
{{scope.row.SomeData}
<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>