html表格中加下拉,怎样在iview的Table表格中添加下拉菜单?

我怎么在table表格里面添加下拉菜单

render: (h, params) => {

return h('div', [

h('Button', {

props: {

type: 'primary',

size: 'small'

},

style: {

marginRight: '5px'

},

on: {

click: () => {

this.show(params);

}

}

}, '详情'),

h('Button', {

props: {

type: 'error',

size: 'small'

},

style: {

marginRight: '5px'

},

on: {

click: () => {

if(window.confirm('你确定删除该员工信息吗?')){

//alert("确定");

const index=params.index;

console.log(this.data3[index].userid);//删除用户的ID

axios.post(//发送数据,重新获取database3

)

this.data3.splice(index, 1);

}else{

//alert("取消");

return false;

}

}

}

}, '刪除'),

h('Button', {

props: {

type: 'error',

size: 'small',

},

style: {

marginRight: '5px'

},

on: {

click: () => {

this.change(params);

}

}

}, '更多'),

h('Dropdown',[

h('Button','下拉菜单'),

h('DropdownMenu',{

props:{

slot:"list"

},

},[

h('DropdownItem','驴打滚'),

h('DropdownItem','驴打滚')

])

])

]);

}

这是render函数,但是出来的效果却是这样的

bV9DLs?w=318&h=106

我想要的是这样的效果

bV9DLL?w=210&h=341

职业哥该怎么做

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值