Skip to content
This repository was archived by the owner on Dec 26, 2018. It is now read-only.

Commit 9e0ae13

Browse files
committed
run updater method in mounted() and in watcher
1 parent 6adbf31 commit 9e0ae13

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/component.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default {
3434
this.recognizers = {} // not reactive
3535
this.setupBuiltinRecognizers()
3636
this.setupCustomRecognizers()
37+
this.updateEnabled()
3738
}
3839
},
3940
destroyed() {
@@ -42,6 +43,15 @@ export default {
4243
}
4344
},
4445

46+
watch: {
47+
enabled: {
48+
deep: true,
49+
handler(...args) {
50+
this.updateEnabled(...args)
51+
}
52+
}
53+
},
54+
4555
methods: {
4656

4757
setupBuiltinRecognizers() {

0 commit comments

Comments
 (0)