perf: table actions

pull/153/head
xingyu4j 2025-06-21 16:23:10 +08:00
parent a063d8e81e
commit ff76f24db6
1 changed files with 7 additions and 2 deletions

View File

@ -293,8 +293,13 @@ function getActionKey(action: ActionItem, index: number) {
</Button>
</slot>
<template #overlay>
<Menu @click="handleMenuClick">
<Menu.Item v-for="(action, index) in getDropdownList" :key="index">
<Menu>
<Menu.Item
v-for="(action, index) in getDropdownList"
:key="index"
:disabled="action.disabled"
@click="!action.popConfirm && handleMenuClick({ key: index })"
>
<template v-if="action.popConfirm">
<Popconfirm v-bind="getPopConfirmProps(action.popConfirm)">
<template v-if="action.popConfirm.icon" #icon>