| | |
| | | data: { |
| | | type: Array, |
| | | default() { |
| | | return [ ]; |
| | | return []; |
| | | }, |
| | | }, |
| | | klineIndex: { |
| | |
| | | }, |
| | | methods: { |
| | | klineInIt(newVal) { |
| | | // if (this.klineData ) { |
| | | // this.klineData.remove(); // 销毁旧的图表实例 |
| | | // } |
| | | dispose("kline-BoxMain"); |
| | | // if (this.klineData ) { |
| | | // this.klineData.remove(); // 销毁旧的图表实例 |
| | | // } |
| | | dispose("kline-BoxMain"); |
| | | if (this.klineData && newVal) { |
| | | console.log('this.klineDatathis.klineData',this.klineData); |
| | | console.log("this.klineDatathis.klineData", this.klineData); |
| | | this.klineData = null; |
| | | this.isVisible = false; |
| | | this.klineData.remove(); // 销毁旧的图表实例 |
| | | this.klineData.remove(); // 销毁旧的图表实例 |
| | | } |
| | | this.klineData = init("kline-BoxMain", { |
| | | locale: langStore.language, //https://klinecharts.com/guide/i18n.html |
| | |
| | | //切换副线 |
| | | checkLineType(val) { |
| | | this.lineValue = val; |
| | | |
| | | this.klineData?.createIndicator(val, false, { id: "pane_1" }); |
| | | }, |
| | | }, |