From 91c82965b2d987452ca276e3a03b48c8dcda2ae9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 19 八月 2026 11:47:26 +0800
Subject: [PATCH] config(env): 更新生产环境配置和公司名称
---
src/components/table-action/table-action.vue | 78 +++++++++++++++++++++------------------
1 files changed, 42 insertions(+), 36 deletions(-)
diff --git a/src/components/table-action/table-action.vue b/src/components/table-action/table-action.vue
index f813c12..55e2183 100644
--- a/src/components/table-action/table-action.vue
+++ b/src/components/table-action/table-action.vue
@@ -6,15 +6,16 @@
import { computed, unref, watch } from 'vue';
-import { useAccess } from '..\..\packages\effects\access\src';
-import { IconifyIcon } from '..\..\packages\icons\src';
-import { $t } from '..\..\packages\locales\src';
-import { isBoolean, isFunction } from '..\..\packages\utils\src';
+import { useAccess } from '@vben/access';
+import { IconifyIcon } from '@vben/icons';
+import { $t } from '@vben/locales';
+import { isBoolean, isFunction } from '@vben/utils';
import {
Button,
Dropdown,
Menu,
+ Modal,
Popconfirm,
Space,
Tooltip,
@@ -97,6 +98,8 @@
attrs.onCancel = popConfirm.cancel;
}
+ // 涓嶈缃� getPopupContainer锛岃瀹冮粯璁ゆ寕杞藉埌 body锛岄伩鍏嶈閬尅
+
return attrs;
}
@@ -120,7 +123,23 @@
/** 澶勭悊鑿滃崟鐐瑰嚮 */
function handleMenuClick(e: any) {
const action = getDropdownList.value[e.key];
- if (action && action.onClick && isFunction(action.onClick)) {
+ if (!action) {
+ return;
+ }
+ const popConfirm = action.popConfirm;
+ if (popConfirm) {
+ // 涓嬫媺鑿滃崟椤逛細琚� Dropdown 鑷姩鍏抽棴閿�姣侊紝宓屽 Popconfirm 鏃犳硶寮瑰嚭锛�
+ // 鏁呮敼鐢ㄥ懡浠ゅ紡 Modal.confirm 瀹屾垚纭
+ Modal.confirm({
+ title: popConfirm.title,
+ okText: popConfirm.okText,
+ cancelText: popConfirm.cancelText,
+ onOk: popConfirm.confirm ? () => popConfirm.confirm!() : undefined,
+ onCancel: popConfirm.cancel ? () => popConfirm.cancel!() : undefined,
+ });
+ return;
+ }
+ if (action.onClick && isFunction(action.onClick)) {
action.onClick();
}
}
@@ -199,39 +218,20 @@
v-for="(action, index) in getDropdownList"
:key="index"
:disabled="action.disabled"
- @click="!action.popConfirm && handleMenuClick({ key: index })"
+ @click="handleMenuClick({ key: index })"
>
- <template v-if="action.popConfirm">
- <Popconfirm v-bind="getPopConfirmProps(action.popConfirm)">
- <template v-if="action.popConfirm.icon" #icon>
- <IconifyIcon :icon="action.popConfirm.icon" />
- </template>
- <div
- :class="
- action.disabled === true
- ? 'cursor-not-allowed text-gray-300'
- : ''
- "
- >
- <IconifyIcon v-if="action.icon" :icon="action.icon" />
- <span :class="action.icon ? 'ml-1' : ''">
- {{ action.label }}
- </span>
- </div>
- </Popconfirm>
- </template>
- <template v-else>
- <div
- :class="
- action.disabled === true
- ? 'cursor-not-allowed text-gray-300'
- : ''
- "
- >
- <IconifyIcon v-if="action.icon" :icon="action.icon" />
+ <div
+ :class="
+ action.disabled === true
+ ? 'cursor-not-allowed text-gray-300'
+ : ''
+ "
+ >
+ <IconifyIcon v-if="action.icon" :icon="action.icon" />
+ <span :class="action.icon ? 'ml-1' : ''">
{{ action.label }}
- </div>
- </template>
+ </span>
+ </div>
</Menu.Item>
</Menu>
</template>
@@ -269,6 +269,12 @@
}
.ant-popconfirm {
+ width: 210px;
+
+ //.ant-popconfirm-message {
+ // white-space: nowrap;
+ //}
+
.ant-popconfirm-buttons {
.ant-btn {
margin-inline-start: 4px !important;
--
Gitblit v1.9.3