From 3cb93fd67cfc1e6ec66996837a6e63ac7c07c0b2 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Wed, 28 Jan 2026 16:33:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=96=B0=E5=A2=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=B0=B4=E6=B3=A2=E7=BA=B9=E6=A0=B7=E5=BC=8F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加按钮水波纹效果的自定义配置功能,支持默认、禁用、内嵌、抖动和欢乐五种样式。用户可在主题设置中选择不同效果,增强交互视觉体验。 - 在主题配置类型中添加 buttonWaveMode 字段 - 新增按钮水波纹配置组件和样式实现 - 更新中英文国际化文本 - 在应用配置中集成水波纹效果 --- apps/web-antd/src/app.vue | 10 +- .../src/components/global/button-wave.ts | 142 ++++++++++++++++++ packages/@core/preferences/src/config.ts | 1 + packages/@core/preferences/src/types.ts | 2 + .../src/widgets/preferences/blocks/index.ts | 1 + .../blocks/theme/button-wave-mode.vue | 38 +++++ .../preferences/preferences-drawer.vue | 5 + .../locales/src/langs/en-US/preferences.json | 1 + .../locales/src/langs/zh-CN/preferences.json | 1 + 9 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 apps/web-antd/src/components/global/button-wave.ts create mode 100644 packages/effects/layouts/src/widgets/preferences/blocks/theme/button-wave-mode.vue diff --git a/apps/web-antd/src/app.vue b/apps/web-antd/src/app.vue index 4884b1cd..27998a8a 100644 --- a/apps/web-antd/src/app.vue +++ b/apps/web-antd/src/app.vue @@ -8,6 +8,7 @@ import { App, ConfigProvider, theme } from 'antdv-next'; import { antdLocale } from '#/locales'; +import { waveConfigs } from './components/global/button-wave'; import { PopupContext } from './utils/context'; defineOptions({ name: 'App' }); @@ -30,10 +31,17 @@ const tokenTheme = computed(() => { token: tokens, }; }); + +// 按钮水波纹样式配置 +const waveConfig = computed(() => { + const { buttonWaveMode } = preferences.theme; + const found = waveConfigs.find((item) => item.name === buttonWaveMode); + return found ? found.wave : {}; +});