Closed andrelec1 closed 3 years ago
This method must be invoked from a user interaction or a device orientation change, else it will fail.
Because of the browser security function, you can only call these methods by a user gesture, event bus can not work, just like the prop watch
.
The second try should work, if you call the this.$test.startTest
in a click callback.
: Register a empty vue component for handle global event.
: Emit event from you desired component
: Listen the event and cry
Another try with wrapped component ...
Vue.set(Vue.prototype, '$test', Test);