Access the data in the Vue instance

访问vue实例中的数据

On the SAYHELLO function, the data in the DATA is accessed, which is not accessible. Need to pass this. That is:
访问vue实例中的数据
Usually we cannot use this to call the title attribute, because this is not a Data object, but Vue has made some work behind us, so we can pass this .title to access the data of the Title property. The access function is also the same, can be accessed through this. THIS.SAYHELLO ();

With the help of Vue, as anywhere in the Vue instance, we can access all properties and methods anywhere in the Vue instance. So here can call the title attribute in Data by this.title

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment