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'            },        })    ]),])
相關文章
相關標籤/搜索