|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <echart-base :options="[options]" :empty="isEmpty" v-model:loading="loading"></echart-base>
|
|
|
|
|
|
|
+ <echart-base :options="[options]" :empty="isEmpty" v-model:loading="loading"></echart-base>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -105,9 +105,9 @@ export default defineComponent({
|
|
|
const result: string[] = [];
|
|
const result: string[] = [];
|
|
|
if (data.length >= count) {
|
|
if (data.length >= count) {
|
|
|
// 均线起始位置
|
|
// 均线起始位置
|
|
|
- const startIndex = historyIndexs[count - 1] ?? count;
|
|
|
|
|
|
|
+ const startIndex = historyIndexs[count - 1];
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
- if (i < startIndex) {
|
|
|
|
|
|
|
+ if (startIndex === undefined || i < startIndex) {
|
|
|
result.push('-');
|
|
result.push('-');
|
|
|
} else {
|
|
} else {
|
|
|
const j = historyIndexs.findIndex((val) => val === i);
|
|
const j = historyIndexs.findIndex((val) => val === i);
|