Describes the sequence of vue functions and vue functions.
Method is used to define the method. For example, if you @ click = "test", methods defines the test method.
Both created and ready are the lifecycles of vue components.
Created
Type: Function
Details:
It is synchronously called after the instance is created. At this time, the instance resolution option has been completed, which means that data binding, calculation attributes, methods, watcher/Event Callback have been established. However, DOM compilation has not started yet, and $ el does not exist yet.
Ready
Type: Function
Details:
It is called after compilation and after el inserts the document for the first time, for example, after the first attached hook. Note that it must be inserted by Vue (for example, vm. el is called after the document is inserted for the first time, for example, after the first attached hook. Note that the ready hook must be triggered only when Vue is inserted (such as vm. appendTo () and other methods or command updates.
Compted is a computing attribute, such
Computed: {B: function () {return this. a + 1 }}
Then the value of B is linked to a, which is always equal to the value of a + 1. The value of a will change when it is modified.
Vue-resource is recommended for the ajax library of vue. Generally, a non-single-page application can obtain data in ready. If a single-page application obtains data based on the routing lifecycle, for example
Route: {data: function (transition) {// obtain data, modify data transition. next ()}}
The above introduction to the sequence of function calls in vue is all the content shared by Alibaba Cloud xiaobian. I hope to give you a reference and support for the help house.