我怎么在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函数,但是出来的效果却是这样的
我想要的是这样的效果
职业哥该怎么做