iview table内渲染proptip组件

渲染proptip组件
columns: [{
        title: '产品图',
        key: 'pic',
        sortable: true,
        render: function(h, para){
            return h('div', [
                h('Button', [
                    h('Poptip', {
                        props: {
                            confirm: true,
                            title: '确定要删除吗!',
                            type: 'error',
                            size: 'small'
                        },
                        on: {
                            'on-ok': function(){
                                alert('删除按钮,没效果')
                            },
                            'on-cancel': function(){
                                alert('取消按钮,没效果')
                            }
                        }
                    }, '删除')
                ])
            ]);
        }
    }]
h('div', [
h('Poptip',{
props:{
title:'复制成功!'
}
},[
h('Button',{
props:{
icon:"md-copy",
size:'small',
},
style:{
lineHeight:'27px',
marginLeft:'2px',
float:'left'
},
})
]),

])

猜你喜欢

转载自www.cnblogs.com/web-zqk/p/9593762.html
今日推荐