Vben
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
3 deletions
-
packages/effects/layouts/src/widgets/color-toggle.vue
|
|
|
@ -13,10 +13,11 @@ defineOptions({ |
|
|
|
name: 'AuthenticationColorToggle', |
|
|
|
}); |
|
|
|
|
|
|
|
function handleUpdate(value: BuiltinThemeType) { |
|
|
|
function handleUpdate(colorPrimary: string, type: BuiltinThemeType) { |
|
|
|
updatePreferences({ |
|
|
|
theme: { |
|
|
|
builtinType: value, |
|
|
|
colorPrimary, |
|
|
|
builtinType: type, |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
@ -30,7 +31,7 @@ function handleUpdate(value: BuiltinThemeType) { |
|
|
|
<template v-for="preset in COLOR_PRESETS" :key="preset.color"> |
|
|
|
<VbenIconButton |
|
|
|
class="flex-center flex-shrink-0" |
|
|
|
@click="handleUpdate(preset.type)" |
|
|
|
@click="handleUpdate(preset.color, preset.type)" |
|
|
|
> |
|
|
|
<div |
|
|
|
:style="{ backgroundColor: preset.color }" |
|
|
|
|