feat: use table-actions

This commit is contained in:
xingyu4j
2025-05-15 11:50:13 +08:00
parent 18273c42a6
commit e8c87b5a2b
3 changed files with 68 additions and 77 deletions

View File

@@ -229,15 +229,33 @@ setupVbenVxeTable({
},
},
{
trigger: () => renderBtn({ ...opt }, false),
default: () =>
h(
'div',
{ class: 'truncate' },
$t('ui.actionMessage.deleteConfirm', [
row[attrs?.nameField || 'name'],
]),
),
trigger: () => {
return h(
NButton,
{
...props,
...opt,
icon: undefined,
},
{
default: () => {
const content = [];
if (opt.icon) {
content.push(
h(IconifyIcon, { class: 'size-5', icon: opt.icon }),
);
}
content.push(opt.concent);
return content;
},
},
);
},
default: () => {
return $t('ui.actionMessage.deleteConfirm', [
row[attrs?.nameField || 'name'],
]);
},
},
);
}