From cca740dbf67cf142f8190da787a2ffb2be7af37a Mon Sep 17 00:00:00 2001 From: lzxb <1340641314@qq.com> Date: Mon, 31 Jul 2017 16:03:47 +0800 Subject: [PATCH] fix:bind this --- src/smart-apollo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smart-apollo.js b/src/smart-apollo.js index 3b769b72..5109e231 100644 --- a/src/smart-apollo.js +++ b/src/smart-apollo.js @@ -81,7 +81,7 @@ class SmartApollo { let cb = this.executeApollo.bind(this) cb = this.options.throttle ? throttle(cb, this.options.throttle) : cb cb = this.options.debounce ? debounce(cb, this.options.debounce) : cb - this.unwatchVariables = this.vm.$watch(() => this.options.variables.bind(this.vm)(), cb, { + this.unwatchVariables = this.vm.$watch(() => this.options.variables.call(this.vm), cb, { immediate: true, }) } else {