Skip to content

Commit

Permalink
feat(core): add hooks params of options and Echarts
Browse files Browse the repository at this point in the history
  • Loading branch information
xiguaxigua committed Jul 11, 2018
1 parent 64870fd commit e4ef7bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
},

Expand Down

0 comments on commit e4ef7bd

Please sign in to comment.