diff --git a/src/components/Table/src/components/TableAction.vue b/src/components/Table/src/components/TableAction.vue index 0c882a1f..4c5c1ed9 100644 --- a/src/components/Table/src/components/TableAction.vue +++ b/src/components/Table/src/components/TableAction.vue @@ -104,21 +104,20 @@ }); const getDropdownList = computed((): any[] => { - return (toRaw(props.dropDownActions) || []) - .filter((action) => { - return hasPermission(action.auth) && isIfShow(action); - }) - .map((action, index) => { - const { label, popConfirm } = action; - return { - ...action, - ...popConfirm, - onConfirm: popConfirm?.confirm, - onCancel: popConfirm?.cancel, - text: label, - divider: index < props.dropDownActions.length - 1 ? props.divider : false, - }; - }); + const list = (toRaw(props.dropDownActions) || []).filter((action) => { + return hasPermission(action.auth) && isIfShow(action); + }); + return list.map((action, index) => { + const { label, popConfirm } = action; + return { + ...action, + ...popConfirm, + onConfirm: popConfirm?.confirm, + onCancel: popConfirm?.cancel, + text: label, + divider: index < list.length - 1 ? props.divider : false, + }; + }); }); const getAlign = computed(() => {