zoukankan      html  css  js  c++  java
  • 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'
                  }
                }, '删除')
              ])
            ]);
          }
        }
  • 相关阅读:
    dir 函数
    模块的 __name__
    from..import 语句
    pass
    可变参数
    python 中的一点新知识
    Numpy中的一点小知识
    使用ipython %matplotlib inline
    numpy.random.rand
    Python:numpy中shape和reshape的用法
  • 原文地址:https://www.cnblogs.com/yeanling/p/13826221.html
Copyright © 2011-2022 走看看