From e8ada59510fa46e02b9b68e75e92ae4862998913 Mon Sep 17 00:00:00 2001 From: wuxx <1239378684@qq.com> Date: Tue, 5 Nov 2024 16:02:04 +0800 Subject: [PATCH] fix(color-picker): format --- src/color-picker/panel/index.tsx | 4 ++-- src/color-picker/panel/swatches.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/color-picker/panel/index.tsx b/src/color-picker/panel/index.tsx index d637a6a01..cb4032613 100644 --- a/src/color-picker/panel/index.tsx +++ b/src/color-picker/panel/index.tsx @@ -283,10 +283,10 @@ export default defineComponent({ }, render() { const { - baseClassName, statusClassNames, t, global, recentColors, swatchColors, previewColorStyle, isGradient, + baseClassName, statusClassNames, t, global, swatchColors, previewColorStyle, isGradient, } = this; - const showUsedColors = recentColors !== null && recentColors !== false; + const showUsedColors = this.recentlyUsedColors !== null && this.recentlyUsedColors !== false; let systemColors = swatchColors; if (systemColors === undefined) { diff --git a/src/color-picker/panel/swatches.tsx b/src/color-picker/panel/swatches.tsx index 9e8f4aed5..adfdc7cff 100644 --- a/src/color-picker/panel/swatches.tsx +++ b/src/color-picker/panel/swatches.tsx @@ -69,9 +69,9 @@ export default defineComponent({ * 移除颜色 */ const handleRemoveColor = () => { - const colors = props.colors; + const { colors } = props; const selectedIndex = selectedColorIndex.value; - if (selectedIndex === -1) return + if (selectedIndex === -1) return; colors.splice(selectedIndex, 1); props.handleChange?.(colors); setVisiblePopConfirm(false);