diff --git a/src/layouts/modules/theme-drawer/modules/appearance/index.vue b/src/layouts/modules/theme-drawer/modules/appearance/index.vue
index 259828c5..a7f65e40 100644
--- a/src/layouts/modules/theme-drawer/modules/appearance/index.vue
+++ b/src/layouts/modules/theme-drawer/modules/appearance/index.vue
@@ -1,6 +1,7 @@
+
+
+ {{ $t('theme.appearance.themeRadius.title') }}
+
+
+
+
+
+
+
+
diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts
index b51a46a1..e84906b2 100644
--- a/src/locales/langs/en-us.ts
+++ b/src/locales/langs/en-us.ts
@@ -83,6 +83,9 @@ const local: App.I18n.Schema = {
error: 'Error',
followPrimary: 'Follow Primary'
},
+ themeRadius: {
+ title: 'Theme Radius'
+ },
recommendColor: 'Apply Recommended Color Algorithm',
recommendColorDesc: 'The recommended color algorithm refers to',
preset: {
diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts
index f616d4d6..11a5817c 100644
--- a/src/locales/langs/zh-cn.ts
+++ b/src/locales/langs/zh-cn.ts
@@ -83,6 +83,9 @@ const local: App.I18n.Schema = {
error: '错误色',
followPrimary: '跟随主色'
},
+ themeRadius: {
+ title: '主题圆角'
+ },
recommendColor: '应用推荐算法的颜色',
recommendColorDesc: '推荐颜色的算法参照',
preset: {
diff --git a/src/store/modules/theme/index.ts b/src/store/modules/theme/index.ts
index b0380471..26422b82 100644
--- a/src/store/modules/theme/index.ts
+++ b/src/store/modules/theme/index.ts
@@ -53,7 +53,7 @@ export const useThemeStore = defineStore(SetupStoreId.Theme, () => {
});
/** Naive theme */
- const naiveTheme = computed(() => getNaiveTheme(themeColors.value, settings.value.recommendColor));
+ const naiveTheme = computed(() => getNaiveTheme(themeColors.value, settings.value));
/**
* Settings json
diff --git a/src/store/modules/theme/shared.ts b/src/store/modules/theme/shared.ts
index e980a799..02bf9384 100644
--- a/src/store/modules/theme/shared.ts
+++ b/src/store/modules/theme/shared.ts
@@ -239,19 +239,19 @@ function getNaiveThemeColors(colors: App.Theme.ThemeColor, recommended = false)
* @param colors Theme colors
* @param [recommended=false] Use recommended color. Default is `false`
*/
-export function getNaiveTheme(colors: App.Theme.ThemeColor, recommended = false) {
+export function getNaiveTheme(colors: App.Theme.ThemeColor, settings: App.Theme.ThemeSetting) {
const { primary: colorLoading } = colors;
const theme: GlobalThemeOverrides = {
common: {
- ...getNaiveThemeColors(colors, recommended),
- borderRadius: '6px'
+ ...getNaiveThemeColors(colors, settings.recommendColor),
+ borderRadius: `${settings.themeRadius}px`
},
LoadingBar: {
colorLoading
},
Tag: {
- borderRadius: '6px'
+ borderRadius: `${settings.themeRadius}px`
}
};
diff --git a/src/theme/settings.ts b/src/theme/settings.ts
index 618eff7c..2974e1f1 100644
--- a/src/theme/settings.ts
+++ b/src/theme/settings.ts
@@ -5,6 +5,7 @@ export const themeSettings: App.Theme.ThemeSetting = {
colourWeakness: false,
recommendColor: false,
themeColor: '#646cff',
+ themeRadius: 8,
otherColor: {
info: '#2080f0',
success: '#52c41a',
diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts
index 287035cd..ab79d1c2 100644
--- a/src/typings/app.d.ts
+++ b/src/typings/app.d.ts
@@ -16,6 +16,8 @@ declare namespace App {
recommendColor: boolean;
/** Theme color */
themeColor: string;
+ /** Theme radius */
+ themeRadius: number;
/** Other color */
otherColor: OtherColor;
/** Whether info color is followed by the primary color */
@@ -379,6 +381,9 @@ declare namespace App {
} & Record;
recommendColor: string;
recommendColorDesc: string;
+ themeRadius: {
+ title: string;
+ };
preset: {
title: string;
apply: string;
diff --git a/src/views/home/modules/card-data.vue b/src/views/home/modules/card-data.vue
index 59104700..7b802d88 100644
--- a/src/views/home/modules/card-data.vue
+++ b/src/views/home/modules/card-data.vue
@@ -1,6 +1,7 @@