From 2a851c74a083d7d9ca7cdae31d04073643ea4602 Mon Sep 17 00:00:00 2001 From: zzp <34701892@qq.com> Date: Mon, 15 Sep 2025 10:05:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E4=B8=BALineHol?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=B7=BB=E5=8A=A0barColor=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在LineHol和LineHolYellow组件中新增barColor属性,支持自定义柱状图颜色 - 调整indexRelease.vue页面布局,移除部分注释代码 - 修改顶部导航标题为"编辑精选" - 优化搜索跳转逻辑,使用Session替代uni.getStorageSync --- src/components/charts/LineHol.vue | 8 ++++-- src/components/charts/LineHolYellow.vue | 9 ++++-- src/pages/realtimeInfo/indexRelease.vue | 38 ++++++++++++------------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/components/charts/LineHol.vue b/src/components/charts/LineHol.vue index 17d075d..0b9b808 100644 --- a/src/components/charts/LineHol.vue +++ b/src/components/charts/LineHol.vue @@ -21,6 +21,10 @@ const props = defineProps({ type: Object, default: () => {}, }, + barColor: { + type: String, + default: "#3C74F1", + }, }); watch( @@ -127,10 +131,10 @@ const initChart = () => { show: true, }, itemStyle: { - color: "#3C74F1", + color: props.barColor, normal: { borderRadius: [0, 4, 4, 0], - color: "#3C74F1", + color: props.barColor, // color: function (params) { // return colorList[params.dataIndex]; // }, diff --git a/src/components/charts/LineHolYellow.vue b/src/components/charts/LineHolYellow.vue index ad1b0fa..f9da692 100644 --- a/src/components/charts/LineHolYellow.vue +++ b/src/components/charts/LineHolYellow.vue @@ -19,7 +19,11 @@ const values = ref([]); const props = defineProps({ data: { type: Object, - default: () => { }, + default: () => {}, + }, + barColor: { + type: String, + default: "#3C74F1", }, }); @@ -95,7 +99,7 @@ const initChart = () => { color: "#FFCE34", normal: { borderRadius: [0, 4, 4, 0], - color: "#3C74F1", + color: props.barColor, // color: function (params) { // return colorList[params.dataIndex]; // }, @@ -129,7 +133,6 @@ onMounted(async () => { // await getData(); // initChart(); // }, 5000); - }); diff --git a/src/pages/realtimeInfo/indexRelease.vue b/src/pages/realtimeInfo/indexRelease.vue index 6a542fa..21fdd19 100644 --- a/src/pages/realtimeInfo/indexRelease.vue +++ b/src/pages/realtimeInfo/indexRelease.vue @@ -11,8 +11,8 @@ - - + + 已处理 @@ -39,7 +38,6 @@ 概念标签贴标 - 已处理 @@ -51,14 +49,14 @@ - + --> - + - - - + + +
@@ -69,19 +67,18 @@
- + - + @@ -101,8 +98,11 @@ 退出登录 - + @@ -291,14 +291,12 @@ async function getLineDataFn() { } function goSreach() { - if (uni.getStorageSync("token")) { + if (Session.get("token")) { uni.navigateTo({ url: "/pages/sreachReq/index", }); } else { - uni.navigateTo({ - url: "/pages/login/indexMini", - }); + LoginShow.value = true; } }