Fix beforeDestory when renderChart was not called

This commit is contained in:
Zhang Yijiang
2017-07-04 09:58:52 +08:00
parent 362639c4e2
commit 3e423fd7ae
9 changed files with 27 additions and 9 deletions

View File

@@ -79,6 +79,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -80,6 +80,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -63,6 +63,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -79,6 +79,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -78,6 +78,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -63,6 +63,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -63,6 +63,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -63,6 +63,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })

View File

@@ -64,6 +64,8 @@ export default Vue.extend({
} }
}, },
beforeDestroy () { beforeDestroy () {
if (this._chart) {
this._chart.destroy() this._chart.destroy()
} }
}
}) })