Problems and solutions encountered by Vue
question | owning file | Problem Description | solve | |
---|---|---|---|---|
vue_demo1.html | When writing operational expressions, do not pay attention to the left and right gaps | Expression specification writing, leaving gaps | ||
vue_demo2.html | When declaring a vue object, it doesn't work with Vue | Error with Vue keyword when creating Vue, use const or var instead | ||
vue_demo3.html | Writing html tags in javascript looks weird | It's ok to write, it should be noted that the replace function is abolished in Vue.js2.0 (whether to replace the parent element to become the parent element: true instead, false, indicating the child element of the parent element), and to force the template to have only one root element | ||
vue_demo4.html | Best source of data in custom templates; presentation of views | It is best to write the data source into the method, and then refer to the corresponding data; for the display of the view, be sure to remember to new it | ||
vue_demo5.html | method format error | Method remember to write colon | ||
view_demo7.html | View output not found | View F12 in the browser | ||
vue_demo8.html | Error executing destroy life cycle | The word of destroy is misspelled (ro is written as or), the life cycle function is destroy, and the implemented function is destroyed Note: Life cycle: |
||
vue_demo9.html | Data is only shown once | Just write an asterisk in front of the key. In version 2.0, you can use v-once to control | ||
vue_demo.html | Conditions are not displayed correctly | v-else must immediately follow v-if statement | ||
vue_demo10.html | currency conversion | {{key | currency '¥' the number of decimal points}} similar to the pipe operator | |
vue_demo11.html | Computed properties are invalid | , forgot the punctuation |