From 3517aa54320411a2430171d8c0aadad54489ac4e Mon Sep 17 00:00:00 2001 From: xiguaxigua Date: Mon, 30 Jul 2018 11:23:11 +0800 Subject: [PATCH] fix(core): load error while change data --- examples/router.js | 1 + examples/test/load.vue | 26 ++++++++++++++++++++++++++ src/core.js | 1 + 3 files changed, 28 insertions(+) create mode 100644 examples/test/load.vue diff --git a/examples/router.js b/examples/router.js index b55c628..ec67ead 100644 --- a/examples/router.js +++ b/examples/router.js @@ -6,6 +6,7 @@ Vue.use(Router) export const TEST_ROUTES = [ { path: '/columns-rows', name: 'data', component: () => import('./test/columns-rows.vue') }, + { path: '/load', name: 'load', component: () => import('./test/load.vue') }, { path: '/custom-props', name: 'options', component: () => import('./test/custom-props.vue') }, { path: '/events', name: 'events', component: () => import('./test/events.vue') }, { path: '/extend', name: 'extend', component: () => import('./test/extend.vue') }, diff --git a/examples/test/load.vue b/examples/test/load.vue new file mode 100644 index 0000000..d428260 --- /dev/null +++ b/examples/test/load.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/core.js b/src/core.js index d441e24..d4d8cf3 100644 --- a/src/core.js +++ b/src/core.js @@ -243,6 +243,7 @@ export default { setOptionOpts = false } } + if (this._isDestroyed) return this.echarts.setOption(options, setOptionOpts) this.$emit('ready', this.echarts, options, echartsLib) if (!this._once['ready-once']) {