效果
ivew的Table中使用render添加圖片poptip冒泡方法
{
title: '操作',
key: 'action',
width: 120,
align: 'center',
render: (h, params) => {
if(params.row.status ==0){
return h('div', [
h('span',[
h('poptip', {
props: {
content: '修改',
trigger: 'hover',
type: 'error',
size: 'small'
},
style: {
marginRight: '3px'
}
}, [
h('img' ,{
domProps: {
align: 'center',
src: require('../../assets/edit1.png'),
},
style: {
width:'15px',
marginRight: '15px'
},
on: {
click: () => {
this.change(params.row)
},
}
})
])
]),
h('span',[
h('poptip', {
props: {
content: '刪除',
trigger: 'hover',
type: 'error',
size: 'small'
},
style: {
marginRight: '3px'
}
}, [
h('img', {
domProps: {
align: 'center',
src: require('../../assets/delete1.png')
},
style: {
width:'15px'
},
on: {
click: () => {
this.del(params.row)
}
}
})
])
])
])
}//end if status ==0
}
}