diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue index d0bd9103..6e6e3c05 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue @@ -100,8 +100,17 @@ @@ -181,6 +190,7 @@ export default defineComponent({ const chartDataEditorVisible = ref(false) const presetThemesVisible = ref(false) + const presetThemeColorHoverIndex = ref<[number, number]>([-1, -1]) const { addHistorySnapshot } = useHistorySnapshot() @@ -262,8 +272,9 @@ export default defineComponent({ } // 使用预置主题配色 - const applyPresetTheme = (colors: string[]) => { - updateElement({ themeColor: colors }) + const applyPresetTheme = (colors: string[], index: number) => { + const themeColor = colors.slice(0, index + 1) + updateElement({ themeColor }) presetThemesVisible.value = false } @@ -295,6 +306,7 @@ export default defineComponent({ return { chartDataEditorVisible, presetThemesVisible, + presetThemeColorHoverIndex, handleElement, updateData, fill, @@ -364,5 +376,10 @@ export default defineComponent({ .preset-theme-color { width: 20px; height: 20px; + + &.select { + transform: scale(1.2); + transition: transform $transitionDelayFast; + } } \ No newline at end of file