From b2b8e5ed16f139597b10452df0c467b6e7cde500 Mon Sep 17 00:00:00 2001 From: gerson <1405270578@qq.com> Date: 星期日, 11 八月 2024 23:35:51 +0800 Subject: [PATCH] markdown 解析,echart tooltip,chatHistory 回复为空 --- miniprogram/components/chat-components/summary/recordset/recordset.ts | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/miniprogram/components/chat-components/summary/recordset/recordset.ts b/miniprogram/components/chat-components/summary/recordset/recordset.ts index 998537a..eac2c6d 100644 --- a/miniprogram/components/chat-components/summary/recordset/recordset.ts +++ b/miniprogram/components/chat-components/summary/recordset/recordset.ts @@ -95,7 +95,21 @@ tooltip: { textStyle: { fontSize: BASE_CHART_FONT_SIZE - } + }, + position: function(point, params, dom, rect, size){ + let x = point[0], + y = point[1], + viewWidth = size.viewSize[0], + boxWidth = size.contentSize[0], + posX = 0; + if(x + boxWidth > viewWidth){ + posX = x - boxWidth; + }else{ + posX = x; + } + return [posX,y]; + }, + }, legend: { top: 19, @@ -237,7 +251,8 @@ this.chartInstance = echarts.init(canvas, null, { width: width, height: height, - devicePixelRatio: dpr // new + devicePixelRatio: dpr, // new + locale:'ZH' }) this.drawChart(); -- Gitblit v1.9.3