iview表格下拉操作

{
  title: "操作", align: "center",
  render: (h, {row}) => {
    event.preventDefault();
    event.stopPropagation();
    let $this = this;
    return h('Dropdown', {
      props: {trigger: 'click'},
      on: {
        'on-click': (name) => {
          event.preventDefault();
          event.stopPropagation();
          switch (name) {
            case 'pass':
              //通過操作
              break;
            case 'not-pass':
              //不通過操作
              break;
          }

        }
      }
    }, [
      h('a', {}, [
        h('Icon', {
          props: {type: 'gear-a'}
        })
      ]),
      h('DropdownMenu', {
        slot: 'list',
      }, [
        h('DropdownItem', {
          props: {name: 'pass'}
        }, `通過`),
        h('DropdownItem', {
          props: {
            name: 'not-pass',
          },
        }, `不通過`),
      ])
    ])
  }
},

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章