feat(theme): 新增按钮水波纹样式配置选项

添加按钮水波纹效果的自定义配置功能,支持默认、禁用、内嵌、抖动和欢乐五种样式。用户可在主题设置中选择不同效果,增强交互视觉体验。

- 在主题配置类型中添加 buttonWaveMode 字段
- 新增按钮水波纹配置组件和样式实现
- 更新中英文国际化文本
- 在应用配置中集成水波纹效果
This commit is contained in:
dap
2026-01-28 16:33:27 +08:00
parent cb2a58425f
commit 3cb93fd67c
9 changed files with 200 additions and 1 deletions

View File

@@ -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 : {};
});
</script>
<template>
<ConfigProvider :locale="antdLocale" :theme="tokenTheme">
<ConfigProvider :locale="antdLocale" :theme="tokenTheme" :wave="waveConfig">
<App>
<RouterView />
<PopupContext />