refactor(antd): 移除Popconfirm中已废弃的getVxePopupContainer属性

antd已支持滚动跟随,不再需要手动指定getVxePopupContainer属性。删除相关代码及工具函数,简化实现。
This commit is contained in:
dap
2026-01-15 10:07:06 +08:00
parent 448856e547
commit 884c4f39fd
22 changed files with 6 additions and 107 deletions

View File

@@ -6,7 +6,6 @@ import type { Client } from '#/api/system/client/model';
import { useAccess } from '@vben/access';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -160,7 +159,6 @@ const { hasAccessByCodes } = useAccess();
</ghost-button>
<Popconfirm
:disabled="row.id === 1"
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -5,7 +5,6 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
import type { SysConfig } from '#/api/system/config/model';
import { Page, useVbenModal } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -156,7 +155,6 @@ async function handleRefreshCache() {
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -7,7 +7,7 @@ import type { Dept } from '#/api/system/dept/model';
import { nextTick } from 'vue';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { eachTree, getVxePopupContainer } from '@vben/utils';
import { eachTree } from '@vben/utils';
import { Popconfirm, Space } from 'antdv-next';
@@ -163,7 +163,6 @@ function setExpandOrCollapse(expand: boolean) {
{{ $t('pages.common.add') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -9,12 +9,7 @@ import { computed, ref } from 'vue';
import { useAccess } from '@vben/access';
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
import { $t } from '@vben/locales';
import {
eachTree,
getVxePopupContainer,
listToTree,
treeToList,
} from '@vben/utils';
import { eachTree, listToTree, treeToList } from '@vben/utils';
import { Popconfirm, Space, Switch, Tooltip } from 'antdv-next';
@@ -245,7 +240,6 @@ const isAdmin = computed(() => {
{{ $t('pages.common.add') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
:title="removeConfirmTitle(row)"
@confirm="handleDelete(row)"

View File

@@ -5,7 +5,6 @@ import type { VxeGridProps } from '#/adapter/vxe-table';
import type { Notice } from '#/api/system/notice/model';
import { Page, useVbenModal } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -127,7 +126,6 @@ function handleMultiDelete() {
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -6,7 +6,6 @@ import type { OssConfig } from '#/api/system/oss-config/model';
import { useAccess } from '@vben/access';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -145,7 +144,6 @@ const { hasAccessByCodes } = useAccess();
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -13,7 +13,6 @@ import { useAppConfig } from '@vben/hooks';
import { $t } from '@vben/locales';
import { stringify } from '@vben/request';
import { useAccessStore } from '@vben/stores';
import { getVxePopupContainer } from '@vben/utils';
import {
Image,
@@ -295,7 +294,6 @@ const [FileUploadModal, fileUploadApi] = useVbenModal({
{{ $t('pages.common.download') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -7,7 +7,6 @@ import type { Post } from '#/api/system/post/model';
import { ref } from 'vue';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -169,7 +168,6 @@ function handleDownloadExcel() {
{{ $t('pages.common.edit') }}
</GhostButton>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -7,7 +7,6 @@ import type { User } from '#/api/system/user/model';
import { useRoute } from 'vue-router';
import { Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -132,7 +131,6 @@ function handleMultipleAuthCancel() {
</template>
<template #action="{ row }">
<Popconfirm
:get-popup-container="getVxePopupContainer"
:title="`是否取消授权用户[${row.userName} - ${row.nickName}]?`"
placement="left"
@confirm="handleAuthCancel(row)"

View File

@@ -15,7 +15,6 @@ import {
SUPERADMIN_ROLE_ID,
SUPERADMIN_ROLE_KEY,
} from '@vben/constants';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -221,7 +220,6 @@ async function handleChangeStatus(checked: boolean, row: Role) {
分配
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -8,7 +8,6 @@ import { computed } from 'vue';
import { useAccess } from '@vben/access';
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -217,7 +216,6 @@ function handleSyncTenantConfig() {
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
:title="`确认同步[${row.companyName}]的套餐吗?`"
placement="left"
@confirm="handleSync(row)"
@@ -231,7 +229,6 @@ function handleSyncTenantConfig() {
</ghost-button>
</Popconfirm>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"

View File

@@ -8,7 +8,6 @@ import { computed } from 'vue';
import { useAccess } from '@vben/access';
import { Fallback, Page, useVbenDrawer } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'antdv-next';
@@ -169,7 +168,6 @@ const isSuperAdmin = computed(() => {
{{ $t('pages.common.edit') }}
</ghost-button>
<Popconfirm
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认删除?"
@confirm="handleDelete(row)"