feat(projects): support set global redius

This commit is contained in:
CyberShen123
2025-10-02 23:52:41 +08:00
committed by Soybean
parent dac5075be9
commit 24c6df528b
10 changed files with 49 additions and 7 deletions

View File

@ -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

View File

@ -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`
}
};