| | |
| | | ], |
| | | SplashTitle: "loading...", |
| | | Symbol: "600015.sh", |
| | | IsAutoUpdate: true, // 是自动更新数据 |
| | | IsAutoUpdate: false, // 是自动更新数据 |
| | | AutoUpdateFrequency: 15000, |
| | | IsApiPeriod: true, |
| | | IsShowRightMenu: false, // 是否显示右键菜单 |
| | |
| | | Name: i18n.t("hj89"), |
| | | ID: 2, |
| | | }, |
| | | { |
| | | Name: i18n.t("hj90"), |
| | | ID: 4, |
| | | }, |
| | | { |
| | | Name: i18n.t("hj91"), |
| | | ID: 5, |
| | | }, |
| | | // { |
| | | // Name: i18n.t("hj90"), |
| | | // ID: 4, |
| | | // }, |
| | | // { |
| | | // Name: i18n.t("hj91"), |
| | | // ID: 5, |
| | | // }, |
| | | { |
| | | Name: i18n.t("hj92"), |
| | | ID: 7, |
| | |
| | | if (this.timerss) { |
| | | clearInterval(this.timerss); |
| | | } |
| | | this.clearTime(); |
| | | }, |
| | | methods: { |
| | | // 清除所有定时器 |
| | | clearTime() { |
| | | // 创建一个额外的定时器以获取当前最大定时器 ID |
| | | let lastIntervalId = setInterval(() => {}, 1000); |
| | | // 遍历并清除所有定时器 |
| | | for (let i = 1; i <= lastIntervalId; i++) { |
| | | clearInterval(i); |
| | | clearTimeout(i); |
| | | } |
| | | }, |
| | | init() { |
| | | this.OnSize(); |
| | | this.SetChartStyle(); |
| | |
| | | HQChart.Chart.JSChart.SetStyle(blackStyle); |
| | | }, |
| | | handleClick(tab) { |
| | | this.clearTime(); |
| | | this.KLineChart.ChangePeriod(tab.$attrs.Id); |
| | | }, |
| | | |
| | |
| | | data, |
| | | callback // 第3方数据替换接口 |
| | | ) { |
| | | if (this.timerss) { |
| | | clearInterval(this.timerss); |
| | | this.timerss = null; |
| | | } |
| | | EastMoney.HQData.Log("[HQChartDemo::NetworkFilter] data", data); |
| | | |
| | | this.timeChange(data, callback); |
| | | this.timerss = setInterval(() => { |
| | | this.timeChange(data, callback); |