mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-11-12 11:43:42 +08:00
feat(projects): support set global redius
This commit is contained in:
@@ -14,6 +14,7 @@ type ThemePreset = Pick<
|
|||||||
| 'colourWeakness'
|
| 'colourWeakness'
|
||||||
| 'recommendColor'
|
| 'recommendColor'
|
||||||
| 'themeColor'
|
| 'themeColor'
|
||||||
|
| 'themeRadius'
|
||||||
| 'otherColor'
|
| 'otherColor'
|
||||||
| 'isInfoFollowPrimary'
|
| 'isInfoFollowPrimary'
|
||||||
| 'layout'
|
| 'layout'
|
||||||
|
|||||||
@@ -236,8 +236,9 @@ function getNaiveThemeColors(colors: App.Theme.ThemeColor, recommended = false)
|
|||||||
/**
|
/**
|
||||||
* Get naive theme
|
* Get naive theme
|
||||||
*
|
*
|
||||||
* @param colors Theme colors
|
* @param settings Theme settings object.
|
||||||
* @param [recommended=false] Use recommended color. Default is `false`
|
* @param settings.recommendColor Whether to use recommended color palette.
|
||||||
|
* @param settings.themeRadius Border radius to use in the theme (in px).
|
||||||
*/
|
*/
|
||||||
export function getNaiveTheme(colors: App.Theme.ThemeColor, settings: App.Theme.ThemeSetting) {
|
export function getNaiveTheme(colors: App.Theme.ThemeColor, settings: App.Theme.ThemeSetting) {
|
||||||
const { primary: colorLoading } = colors;
|
const { primary: colorLoading } = colors;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"warning": "#d4bb9d",
|
"warning": "#d4bb9d",
|
||||||
"error": "#c49a9a"
|
"error": "#c49a9a"
|
||||||
},
|
},
|
||||||
|
"themeRadius": 8,
|
||||||
"isInfoFollowPrimary": true,
|
"isInfoFollowPrimary": true,
|
||||||
"layout": {
|
"layout": {
|
||||||
"mode": "vertical-mix",
|
"mode": "vertical-mix",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"warning": "#faad14",
|
"warning": "#faad14",
|
||||||
"error": "#f5222d"
|
"error": "#f5222d"
|
||||||
},
|
},
|
||||||
|
"themeRadius": 8,
|
||||||
"isInfoFollowPrimary": true,
|
"isInfoFollowPrimary": true,
|
||||||
"layout": {
|
"layout": {
|
||||||
"mode": "vertical",
|
"mode": "vertical",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"warning": "#faad14",
|
"warning": "#faad14",
|
||||||
"error": "#f5222d"
|
"error": "#f5222d"
|
||||||
},
|
},
|
||||||
|
"themeRadius": 8,
|
||||||
"isInfoFollowPrimary": true,
|
"isInfoFollowPrimary": true,
|
||||||
"layout": {
|
"layout": {
|
||||||
"mode": "vertical",
|
"mode": "vertical",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"warning": "#faad14",
|
"warning": "#faad14",
|
||||||
"error": "#f5222d"
|
"error": "#f5222d"
|
||||||
},
|
},
|
||||||
|
"themeRadius": 8,
|
||||||
"isInfoFollowPrimary": true,
|
"isInfoFollowPrimary": true,
|
||||||
"layout": {
|
"layout": {
|
||||||
"mode": "vertical",
|
"mode": "vertical",
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ function getGradientColor(color: CardData['color']) {
|
|||||||
<!-- define component start: GradientBg -->
|
<!-- define component start: GradientBg -->
|
||||||
<DefineGradientBg v-slot="{ $slots, gradientColor }">
|
<DefineGradientBg v-slot="{ $slots, gradientColor }">
|
||||||
<div
|
<div
|
||||||
class="rd-8px px-16px pb-4px pt-8px text-white"
|
class="px-16px pb-4px pt-8px text-white"
|
||||||
:style="{ backgroundImage: gradientColor, borderRadius: themeStore.themeRadius + 'px' }"
|
:style="{ backgroundImage: gradientColor, borderRadius: themeStore.themeRadius + 'px' }"
|
||||||
>
|
>
|
||||||
<component :is="$slots.default" />
|
<component :is="$slots.default" />
|
||||||
|
|||||||
Reference in New Issue
Block a user