button rendered by render adds the loading attribute so that all buttons will be in loading state after triggering the event. Is there any way to make only the button that is currently clicked loading?
{
title: "",
key: "action",
width: 150,
align: "center",
render: (h, params) => {
return h("div", [
h("Button", {
props: {
type: "primary",
size: "small"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.edit(params.index, params.row)
}
}
}, ""),
h("Button", {
props: {
type: "error",
size: "small",
loading: this.loading
},
on: {
click: () => {
this.remove(params.index, params.row)
}
}
}, "")
]);
}
}