how do I add a drop-down menu to the 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","")
])
])
]);
}
this is the render function, but the effect is as follows:
what a professional should do