+
{{ 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');
From 61c43df51b7a06f813024d8a20d416f0095051fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?=
<1262327911@qq.com>
Date: Mon, 27 Feb 2023 13:06:27 +0800
Subject: [PATCH 12/12] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E9=A2=9C=E8=89=B2=E4=B9=8B=E5=90=8E=E8=87=AA=E5=8A=A8?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E9=94=99=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/CanvasPage/components/CreateColor/index.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 4186750c..e73eba55 100644
--- a/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue
+++ b/src/views/chart/ContentConfigurations/components/CanvasPage/components/CreateColor/index.vue
@@ -204,8 +204,8 @@ const deleteHandle = (index: number) => {
colorList.splice(index, 1)
chartEditStore.setEditCanvasConfig(EditCanvasConfigEnum.CHART_CUSTOM_THEME_COLOR_INFO, cloneDeep(colorList))
nextTick(() => {
- if (index) {
- selectHandle(colorList[index - 1])
+ if (colorList.length) {
+ selectHandle(colorList[index - 1 > -1 ? index - 1 : index])
} else {
// 已清空
selectColor.selectInfo = undefined