From 72dc278a2bd762402387cf87adb8badd9377c71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Fri, 28 Nov 2025 01:19:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/heatmap/heatmap.vue | 17 +++++++-- config/uhalo.config.js | 1 + manifest.json | 2 +- pagesA/data-visual/data-visual.vue | 35 +++++++++++++++---- .../js_sdk/u-charts/config-ucharts.js | 10 ++++-- 5 files changed, 52 insertions(+), 13 deletions(-) diff --git a/components/heatmap/heatmap.vue b/components/heatmap/heatmap.vue index 27c791b..6fe45d1 100644 --- a/components/heatmap/heatmap.vue +++ b/components/heatmap/heatmap.vue @@ -6,7 +6,7 @@ {{ dataRangeYears }} - + @@ -52,7 +52,7 @@ import tmStepper from '@/tm-vuetify/components/tm-stepper/tm-stepper.vue'; export default { name: 'Heatmap', components: { - tmStepper + tmStepper }, props: { year: { @@ -77,7 +77,8 @@ export default { displayDays: [], showTooltip: null, currentYear: '1900', - currentYearData: [] + currentYearData: [], + yearList:[] }; }, computed: { @@ -213,9 +214,16 @@ export default { } }, created() { + this.initYearList() this.filterAndSetCurrentYearData(this.year); }, methods: { + initYearList(){ + for (var index = 1900; index < 2099; index++) { + this.yearList.push(index) + } + this.yearList = this.yearList.reverse(); + }, filterAndSetCurrentYearData(year) { this.currentYear = year; this.currentYearData = this.chartData.filter((x) => x.name.includes(this.currentYear)); @@ -390,6 +398,7 @@ export default { height: 24rpx!important; } .heatmap-container { + width: 100%; display: flex; padding-bottom: 20rpx; } @@ -427,8 +436,10 @@ export default { } .heatmap-content { + width: 100%; display: flex; flex-direction: column; + overflow: hidden; overflow-x: auto; } diff --git a/config/uhalo.config.js b/config/uhalo.config.js index 4cc4e34..5588b61 100644 --- a/config/uhalo.config.js +++ b/config/uhalo.config.js @@ -5,6 +5,7 @@ const UHaloBaseConfig = Object.freeze({ BASE_API: "", // 示例: // BASE_API: "https://blog.xiaoxiaomo.cn", + // BASE_API: "https://www.xhhao.com", // todo:可能有其他配置 }) diff --git a/manifest.json b/manifest.json index fb51fac..698f438 100644 --- a/manifest.json +++ b/manifest.json @@ -119,7 +119,7 @@ "quickapp" : {}, /* 小程序特有相关 */ "mp-weixin" : { - "appid" : "", + "appid" : "wx1bb161867082c72f", "setting" : { "urlCheck" : false, "minified" : true diff --git a/pagesA/data-visual/data-visual.vue b/pagesA/data-visual/data-visual.vue index dee6f2a..4258983 100644 --- a/pagesA/data-visual/data-visual.vue +++ b/pagesA/data-visual/data-visual.vue @@ -46,7 +46,15 @@ - + @@ -63,7 +71,7 @@ - + @@ -81,6 +89,9 @@ - + a.total - b.total); + const data = this.statistics.categories.sort((a, b) => b.total - a.total); const seriesItemData = data.map((item) => item.total); if (Math.max(...seriesItemData) < 10) { this.categoryChart.opts.yAxis.data[0].max = 10; diff --git a/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js b/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js index a9a8696..2a10cee 100644 --- a/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js +++ b/uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js @@ -85,8 +85,8 @@ const cfu = { } }, "xAxisTop10Article":function(val, index, opts){ - if(val.length>4){ - return val.slice(0,4) +'...' + if(val.length>6){ + return val.slice(0,6) +'...' } return val }, @@ -96,6 +96,12 @@ const cfu = { } return val }, + "xAxisCategory":function(val, index, opts){ + if(val.length>6){ + return val.slice(0,6) +'...' + } + return val + }, }, //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。 "demotype":{