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'            },        })    ]),])
相关文章
相关标签/搜索