diff --git a/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue b/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue index 5edac24a..4186750c 100644 --- a/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue +++ b/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue @@ -56,7 +56,7 @@ 立即创建 -
+
{{ item.name }}
@@ -127,7 +127,7 @@ type ColorType = { const defaultColor: ColorType = { id: getUUID(), name: '未命名', - color: ['#6ae5bb', '#69e3de', '#5ac4ee', '#5ac4ee', '#4498ec', '#3c7ddf'] + color: ['#6ae5bb', '#69e3de', '#5ac5ee', '#5ac4ee', '#4498ec', '#3c7ddf'] } const chartEditStore = useChartEditStore() const modelShowRef = ref(false) diff --git a/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRender/index.vue b/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRender/index.vue index 7a842200..a3f6c441 100644 --- a/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRender/index.vue +++ b/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColorRender/index.vue @@ -27,6 +27,7 @@ :show-preview="true" :modes="['hex']" @complete="completeHandle($event, index)" + @update:show="selectHandle(item, index)" />
@@ -183,7 +184,13 @@ const getRenderBackgroundColor = (color?: string) => { } } -// 顶部选择颜色 +// 点击颜色 +const selectHandle = (color: string, index: number) => { + targetColor.color = color + targetColor.index = index +} + +// 顶部改变颜色 const completeHandle = (color?: string, index?: number) => { color && (targetColor.color = color) index && (targetColor.index = index) @@ -205,6 +212,9 @@ const selectExpandColor = (color: string, isHexa: boolean) => { const addColor = () => { const lastData = editColor.value?.color[editColor.value?.color.length - 1] || '#2c2c31' editColor.value?.color.push(lastData) + nextTick(() => { + emit('updateColor', editColor.value) + }) } // 删除颜色 diff --git a/src/views/chart/ContentEdit/components/EditRange/index.vue b/src/views/chart/ContentEdit/components/EditRange/index.vue index d9a7bcc9..d3be9d95 100644 --- a/src/views/chart/ContentEdit/components/EditRange/index.vue +++ b/src/views/chart/ContentEdit/components/EditRange/index.vue @@ -55,7 +55,7 @@ const rangeModelStyle = computed(() => { position: relative; transform-origin: left top; background-size: cover; - border-radius: 20px; + border-radius: 10px; overflow: hidden; @include fetch-border-color('hover-border-color'); @include fetch-bg-color('background-color2');