使⽤render函数渲染html以及添加title属性使⽤render函数渲染html
btnData: [
{
key: '1',
content:'停⽌',
},
{htmlbutton属性
key: '2',
content: '重新执⾏',
}
],
operation(trData){
const parent = this;
return new Vue({
render(h) {
const btnComp = h('WbButton', {
props: {
type: 'primary'
}
}, '操作';
return h('Dropdown', {
props: {
data: parent.btnData,
trigger: 'click'
},
on: {
'on-choose': ({key}) => {
if (key == '1'){
parent.tableStop(trData);
} else{
parent.$utionModal.show()
}
}
}
}, [btnComp])
}
})
},
render添加title属性
componentEllipsis(trData, tdData) {
return new Vue({
render(h) {
let child = [];
console.log('tdData:',tdData)
child.push(
h('div', {
class: `text-ellipsis`,//样式加省略号                    style: 'width: 150px',
attrs:{
title:tdData,//title显⽰内容
},
}, tdData)
);
return h('div',child)
}
})
},

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。