| | |
| | | |
| | | canvasList.forEach((canvas, index) => { |
| | | if (!canvas) return; |
| | | // if (this.listData[index].kLineData) return; |
| | | |
| | | const ctx = canvas.getContext("2d"); |
| | | const width = canvas.width; |
| | |
| | | |
| | | ctx.stroke(); |
| | | }); |
| | | |
| | | console.log("listData: ", this.listData); |
| | | }, |
| | | //排序 |
| | | listSort(val) { |
| | |
| | | this.showList = [...this.listData].sort(this.compare("volume", "up")); |
| | | } |
| | | this.$forceUpdate(); |
| | | this.$nextTick(() => { |
| | | // 为每一项补充 kLineData |
| | | this.listData.forEach((item) => { |
| | | if (!item.kLineData) { |
| | | item.kLineData = this.generateKLineData(); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |