1. 程式人生 > >iview 在Table組件render 中使用Poptip組件 阿星小棧

iview 在Table組件render 中使用Poptip組件 阿星小棧

onf confirm ESS .com err spa bubuko ram AC

            render: (h, params) => {
                            return h(‘div‘, [
                                h(‘Button‘, {
                                    props: {type: ‘error‘, size: ‘small‘},
                                },[
                                    h(‘Poptip‘, {
                                        props: {
                                            confirm: true,
                                            transfer: true,
                                            placement: ‘left-end‘,
                                            title: ‘確定要刪除嗎!‘,
                                            type: ‘error‘,
                                            size: ‘small‘,
                                            width: ‘300‘,

                                        },
                                        on: {
                                            ‘on-ok‘:  ()=>{
                                                this.$Message.info(‘點擊了確定‘)
                                            },
                                            ‘on-cancel‘: function(){
                                                this.$Message.info(‘點擊了取消‘)
                                            }
                                        }
                                    }, ‘刪除‘)
                                ]),
                            ]);
                        }

效果

技術分享圖片

iview 在Table組件render 中使用Poptip組件 阿星小棧