1. Vue instance-a project is assembled with a lot of vue instances. Each build is an instance of Vue.
var vm = new Vue ()
2. VUE instance life cycle Hooks
Life cycle function: A function that the Vue instance automatically executes at a certain point in time
3, VUE template syntax
{{content}}, v-text= "text", v-html= "code"
4. Calculate attributes, methods and listeners (important)
(1) computed attribute computed has a cache, and the variable does not change.
(2) Listener Watch also has a caching mechanism
Both can be used at the same time. We recommend using computed
5. Getter and setter for calculated attributes
6. Style bindings in Vue
(1): class= "JS expression"
(2): class= "[One,two]"
(3): Style= "Object"
(4): style= "[object,{font-size:12px}]"
7. Conditional rendering in Vue
(1) v-if= "" It doesn't exist.
(2) v-show= "" equivalent to display:none effect
8. List rendering in Vue
(1) v-for= "(item,key,index) of list": key= "Item.id"
(2) Template placeholder, not shown in the foreground, better than div
9. The Set method in Vue
(1) Global method
(2) Example method
(3) Changing the array with the Set method
Vue.set (array name, number of digits, value changed)
VM. $set (array name, number of digits, value changed)
Vue.js Introductory Learning (1)-Basic explaining