mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-25 04:04:31 +08:00
feat(theme): 新增按钮水波纹样式配置选项
添加按钮水波纹效果的自定义配置功能,支持默认、禁用、内嵌、抖动和欢乐五种样式。用户可在主题设置中选择不同效果,增强交互视觉体验。 - 在主题配置类型中添加 buttonWaveMode 字段 - 新增按钮水波纹配置组件和样式实现 - 更新中英文国际化文本 - 在应用配置中集成水波纹效果
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user