vue_ hook function

beforecreate: For chestnut: You can add a loading this event; 
the Created: At this end of the loading, but also to do some initialization function to achieve self-executing; 
Mounted: In this launch backend requests, back data, with the routing hook to do something ; 
beforeDestroy: XX Are you sure you delete it? destroyed: the current component has been removed, emptied the content;

created (): When you create an object vue, when before html rendering triggers; however noted that the global vue.js not force a refresh or restart created only once, that is, created () will only be triggered once;

activated (): In case vue survival of the subject, into the presence of activated current () function of the page, a page is triggered to enter; may be used to initialize the page data and the like;

 

mounted: mount after vue example hook function;

activated: after the hook function component is activated;

deactivated: after leaving the hook function component;

 

Guess you like

Origin www.cnblogs.com/wush-1215/p/11464700.html