Summary of Vue knowledge points

1. The properties whose names start with $ are the properties provided internally

2. Reasons why event modifiers are used: methods only have pure data logic, rather than dealing with DOM event details

3. If the value of v-if is false, the element does not exist on the page; if the value is true, it is displayed on the page.
     v-show If the value is false, the element hides display: none; if the value is true, the element displays display: block

     Frequent operation of dom display and hiding, it is recommended to use v-show
     initial page without a certain element, wait for a certain data to change, and then display a certain element, v-if

4. Although watch can be monitored, it is only shallow monitoring, only the first or second layer of data is monitored. If it is an object, deep monitoring is required.

 

list:{ //Deep monitoring
	 deep:true,
	 handler(newValue){
	 console.log(newValue);
	}
}	    

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324982642&siteId=291194637