Browse Source

解决图表报错问题。

milestone-20250710-上线前优化
宋杰 1 day ago
parent
commit
52ae7f3255
  1. 5
      src/views/AiEmotion.vue
  2. 6
      src/views/components/emotionDecod.vue

5
src/views/AiEmotion.vue

@ -2758,8 +2758,9 @@ async function renderChartsSequentially(clonedData, stockIndex = 0) {
if (typeof config.ref[config.method] === "function") {
try {
// DOM
await new Promise((resolve) => setTimeout(resolve, 100));
// 2
const delay = stockIndex === 0 ? 100 : 300 + (stockIndex * 100);
await new Promise((resolve) => setTimeout(resolve, delay));
config.ref[config.method](...config.params);
console.log(`${stockIndex}个股票的${config.name}图表渲染成功`);

6
src/views/components/emotionDecod.vue

@ -406,6 +406,12 @@ function initQXNLZHEcharts(kline, qxnlzhqData) {
],
};
// DOM
if (!KlineCanvs.value) {
console.error('DOM元素未准备好,无法初始化ECharts');
return;
}
// echarts
if (KlineCanvsChart) {
KlineCanvsChart.dispose();

Loading…
Cancel
Save