What is a Vue instance?

Examples in vue

It is similar to creating an object, which contains life cycle hook functions, data (object), methods (methods), components (calculated attributes), etc...
The object data of the vue instance is mainly used to store the data. The Vue framework will detect the data changes of the data and automatically update it to the html.
The calculated attribute is mainly used for some more complex logical calculations. Although { {}} is very convenient, it can only perform simple operations, and can only support a single expression, and multiple errors will be reported.
methods can access these methods through vm instances, mainly used to store function methods
Watch vue provides a more general way to observe and respond to data changes on Vue instances as the data changes.
This answer is reproduced in https://blog.csdn.net/mzrxLXR/article/details/81394121?ops_request_misc=%25257B%252522request%25255Fid%252522%25253A%252522160994206616780264664840%252522%25252C%252522scm%252522%25253A%252522.2014pc07130 %25255Fall.%252522%25257D&request_id=160994206616780264664840&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2 all first_rank_v2~rank_v29-2-81394121.pc_search_result_no_baidu_js&utm_term=88%E4%6% %AFvue%E7%9A%84%E5%AE%9E%E4%BE%8B

Guess you like

Origin blog.csdn.net/ni15534789894/article/details/112299045