Open WORMSS opened 4 years ago
I know it's late, but for future visitors:
This is the scoping caveat noted here in the docs for vue-class-component
library that this repo depends on.
Basically, declare direct methods to allow for magic-binding of this
within the method block to the component class's Vue
instance.
We are seeing a major difference between
// Here
this#1
has access tofoo
as a getter, but notinput
. So whenfoo.someFunction()
is called, it returnsundefined
; Not desireable// Here
this#1
has access tofoo
as a getter,getInput
as a getter, but notinput
. // Herethis#2
has access tofoo
as a getter,getInput
as a getter, ANDinput
as a getter. So whenfoo.someFunction()
is called, it returns theinput
element as desired.