|
|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <echart-base :options="[options]" v-model:loading="loading"></echart-base>
|
|
|
+ <echart-base :options="[options]" :empty="isEmpty" v-model:loading="loading"></echart-base>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -35,6 +35,7 @@ export default defineComponent({
|
|
|
},
|
|
|
setup(props) {
|
|
|
const loading = ref(true);
|
|
|
+ const isEmpty = ref(false);
|
|
|
const historyIndexs: number[] = []; // 行情历史数据中所有非补充数据的索引位置(用于计算均线)
|
|
|
const { chartData, options, updateOptions, initOptions } = handleEchart();
|
|
|
|
|
|
@@ -307,6 +308,8 @@ export default defineComponent({
|
|
|
// 日期升序排序
|
|
|
const kdata = res.sort((a, b) => moment(a.ts).valueOf() - moment(b.ts).valueOf());
|
|
|
handleData(kdata);
|
|
|
+ } else {
|
|
|
+ isEmpty.value = true;
|
|
|
}
|
|
|
initOptions(props.seriesType);
|
|
|
});
|
|
|
@@ -314,6 +317,7 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
|
loading,
|
|
|
+ isEmpty,
|
|
|
options,
|
|
|
};
|
|
|
},
|