fix: replace ant-design-vue with tdesign components in web-tdesign app (#6880)

* Initial plan

* fix: replace ant-design-vue with tdesign components

Co-authored-by: likui628 <90845831+likui628@users.noreply.github.com>

* fix: remove trailing comma in package.json

Co-authored-by: likui628 <90845831+likui628@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: likui628 <90845831+likui628@users.noreply.github.com>
This commit is contained in:
Copilot
2025-11-06 14:35:50 +08:00
committed by GitHub
parent 33b7a605c0
commit 04321b16c1
9 changed files with 36 additions and 49 deletions

View File

@@ -8,7 +8,7 @@ import { defineAsyncComponent, defineComponent, h, ref } from 'vue';
import { ApiComponent, globalShareState, IconPicker } from '@vben/common-ui';
import { $t } from '@vben/locales';
import { notification } from 'ant-design-vue';
import { notification } from '#/adapter/tdesign';
/**
* 通用组件共同的使用的基础组件,原先放在 adapter/form 内部,限制了使用范围,这里提取出来,方便其他地方使用
@@ -218,9 +218,9 @@ async function initComponentAdapter() {
// 复制成功消息提示
copyPreferencesSuccess: (title, content) => {
notification.success({
description: content,
message: title,
placement: 'bottomRight',
title,
content,
placement: 'bottom-right',
});
},
});

View File

@@ -0,0 +1,9 @@
import {
DialogPlugin,
MessagePlugin,
NotificationPlugin,
} from 'tdesign-vue-next';
export const message = MessagePlugin;
export const notification = NotificationPlugin;
export const dialog = DialogPlugin;

View File

@@ -4,7 +4,7 @@ import { h } from 'vue';
import { setupVbenVxeTable, useVbenVxeGrid } from '@vben/plugins/vxe-table';
import { Button, Image } from 'ant-design-vue';
import { Button, Image } from 'tdesign-vue-next';
import { useVbenForm } from './form';
@@ -52,7 +52,7 @@ setupVbenVxeTable({
const { props } = renderOpts;
return h(
Button,
{ size: 'small', type: 'link' },
{ size: 'small', theme: 'primary', variant: 'text' },
{ default: () => props?.text },
);
},