难受就摸头盖骨

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'
},
})
]),

])
posted @ 2018-09-05 18:29  longpanda_怪怪哉  阅读(543)  评论(0编辑  收藏  举报
下定决心了,要把写不出代码就摸后脑勺的习惯给改了! 如果可以~单身待解救~~