ivew中,table里面的按钮,render里面删除按钮的二次确认

  {
      title: '操作',
      key: 'action',
      fixed: 'right',
       130,
      align: 'center',
      render: (h, params) => {
        return h('div', [
          h(
            'Button',
            {
              props: {
                type: 'primary',
                size: 'small'
              },
              style: {
                marginRight: '5px',
                display: that.checkPermission('/newOta/policy/edit') ? 'line' : 'none'
              },
              on: {
                click: () => {
                  that.typeInfo = 1;
                  that.versionId = params.row.id;
                  that.handleOpenModal('addPolicy');
                }
              }
            },
            '修改'
          ),
          h('Poptip', {
            props: {
              title: '您确定要删除这条数据吗?',
              transfer: true,
              confirm: true,
              placement: 'top-end'
            },
            on: {
              'on-ok': () => {
                that.id = params.row.id;
                that.delPolicy(that.id);
              }
            }
          }, [
            h('Button', {
              style: {
                marginLeft: '5px',
                display: that.checkPermission('/newOta/policy/delete') ? 'line' : 'none'
              },
              props: {
                type: 'error',
                size: 'small'
              }
            }, '删除')
          ])
        ]);
      }
    }
原文地址:https://www.cnblogs.com/yeanling/p/13826221.html