This paper describes the process used Vue, some common instructions.
First use Vue, must be introduced vue, (html page) introduced way:
here is a reference to online vue file can be downloaded directly to a local reference
1. Create vue instantiate an object
to be used vue, vue to declare a new object, and create vue examples of the target region:
2.v-ON: the method of binding the tag event, a shorthand way of @
V-ON can bind any attribute, such as mouse events and keyboard events and other operations
may be added event modifier, a combination of keys used to implement effect
3.v-bind: attribute tag binding method, a shorthand way :
V-binding properties of the bind properties can coexist and before
4.v-text and v-html: data replacement method
of the replacement tag content, V- text covers only text
v-html tag may parse
5.v-for data traversal method
6.v-if expression is true or false judgment, whether to show whether to hide the true and false in accordance with the result, if false, the hidden element
here the hide is removed from the code directly element (the element is removed)
7.v Show-determination expression is true, and v-if similar usage, hide the display here: none properties Hide
not meta Delete (elements still)
8.v-Model two-way data binding instructions
when used in the location of the form, input boxes and other elements, to get their data as well as data submitted by the
need to use v-model