iview的table中点击Icon弹Poptip,render函数的写法

render: (h, params) => {
              return h('div', [
                          h('div', [
                              h('Poptip', {
                                  props: {
                                    confirm: true,
                                    transfer: true,
                                    placement: 'left-start',
                                    title: '确定要删除吗!',
                                    type: 'error',
                                    size: 'small',
                                    width: '300',
                                    vModel: true
                                  },
                                  on: {
                                      'on-ok': ()=>{
                                          this.$Message.info('点击了确定')
                                      },
                                      'on-cancel': ()=>{
                                          this.$Message.info('点击了取消')
                                      }
                                  }
                              }, [
                                h('Icon',{
                                    props: {
                                      type: 'ios-gear',
                                      size:18
                                    }
                                })
                              ])
                          ]),
                      ]);
                  }

 

posted @ 2019-01-27 17:00  expworld  阅读(923)  评论(0编辑  收藏  举报