|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-echats-kline">
|
|
|
- <div class="app-echats-kline__tip" v-if="loading">正在加载...</div>
|
|
|
- <div class="app-echats-kline__tip" v-else-if="isEmpty">暂无数据</div>
|
|
|
+ <div class="app-echats-kline__tip" v-if="loading">{{ t('common.loading') }}</div>
|
|
|
+ <div class="app-echats-kline__tip" v-else-if="isEmpty">{{ t('common.nodatas') }}</div>
|
|
|
<template v-else>
|
|
|
<div class="app-echats-kline__container">
|
|
|
<ul class="legend">
|
|
|
@@ -58,6 +58,7 @@ import { PropType, watch, shallowRef } from 'vue'
|
|
|
import { echarts } from '@/components/base/echarts/core'
|
|
|
import { ChartCycleType, ChartSeriesType, getChartSeriesTypeList } from '@/constants/chart'
|
|
|
import { useCandlestickChart } from '@/hooks/echarts/candlestick'
|
|
|
+import { i18n } from '@/stores'
|
|
|
import AppEcharts from '@/components/base/echarts/index.vue'
|
|
|
import AppTabs from '@/components/base/tabs/index.vue'
|
|
|
|
|
|
@@ -83,6 +84,8 @@ const activeSeriesType = shallowRef(ChartSeriesType.MACD); // 当前选中的指
|
|
|
const chartGroup = new Map<string, echarts.ECharts>(); // 图表联动实例组
|
|
|
const chartSeriesTypeList = getChartSeriesTypeList();
|
|
|
|
|
|
+const { t } = i18n.global
|
|
|
+
|
|
|
// 指标切换
|
|
|
const tabChange = (index: number) => {
|
|
|
activeSeriesType.value = chartSeriesTypeList[index].value;
|