feat(projects): support set global redius
This commit is contained in:
@ -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
|
||||
|
||||
@ -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`
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user