From 494fb30a97df9a20cce3ae59e73109e400464e4c Mon Sep 17 00:00:00 2001 From: daluozha <561890199@qq.com> Date: Sat, 30 Jul 2022 16:40:39 +0800 Subject: [PATCH] chore: add 'active' to color-picker of widgets --- src/components/Configurator.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/Configurator.vue b/src/components/Configurator.vue index aa08577..d078e39 100644 --- a/src/components/Configurator.vue +++ b/src/components/Configurator.vue @@ -61,7 +61,13 @@ class="color-list__item" @click="setWidgetColor(s.widgetType, fillColor)" > -
+
@@ -204,6 +210,12 @@ function setWidgetColor(widgetType: WidgetType, fillColor: string) { }) } } + +function getWidgetColor(type: string) { + if (type === WidgetType.Tops || type === WidgetType.Clothes) { + return avatarOption.value.widgets[type]?.fillColor + } else return '' +}