From e4ef7bd274b4fd2b1fdcd99bea91531f62929b7c Mon Sep 17 00:00:00 2001 From: xiguaxigua Date: Wed, 11 Jul 2018 12:00:21 +0800 Subject: [PATCH] feat(core): add hooks params of options and Echarts --- src/core.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core.js b/src/core.js index 1fbf403..d441e24 100644 --- a/src/core.js +++ b/src/core.js @@ -244,16 +244,16 @@ export default { } } this.echarts.setOption(options, setOptionOpts) - this.$emit('ready', this.echarts) + this.$emit('ready', this.echarts, options, echartsLib) if (!this._once['ready-once']) { this._once['ready-once'] = true - this.$emit('ready-once', this.echarts) + this.$emit('ready-once', this.echarts, options, echartsLib) } if (this.judgeWidth) this.judgeWidthHandler(options) - if (this.afterSetOption) this.afterSetOption(this.echarts) + if (this.afterSetOption) this.afterSetOption(this.echarts, options, echartsLib) if (this.afterSetOptionOnce && !this._once['afterSetOptionOnce']) { this._once['afterSetOptionOnce'] = true - this.afterSetOptionOnce(this.echarts) + this.afterSetOptionOnce(this.echarts, options, echartsLib) } },