From 61976a74b788237065691a61d83fdbe785ad7866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=9D=A8?= <1711467488@qq.com> Date: Sat, 17 Feb 2018 21:59:03 +0800 Subject: [PATCH] no message Former-commit-id: e812a76a0d36d3a2a6c5187034999dcc5012e764 Former-commit-id: 20a9c884deffc3bf6dbb3385e24bb8b3409b4b97 Former-commit-id: 0b8c74d5020ade9538a2f268571662810a73346e --- src/components/charts/G2/mixins/G2.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/charts/G2/mixins/G2.js b/src/components/charts/G2/mixins/G2.js index 2b32ef25..fdbb4119 100644 --- a/src/components/charts/G2/mixins/G2.js +++ b/src/components/charts/G2/mixins/G2.js @@ -29,13 +29,11 @@ export default { }, mounted () { // 如果设置了在 mounted 后自动初始化 就在这里初始化 - setTimeout(() => { - if (this.autoInit) { - this.$nextTick(() => { - this.init() - }) - } - }, 300) + if (this.autoInit) { + this.$nextTick(() => { + this.init() + }) + } }, watch: { // 数据改变