Vue 7 properties:
- el property
- Binding id, used to indicate vue compiler where to begin parsing vue syntax can be a placeholder
- property data
- To organize abstracted from the view property, said data view may be stored in data abstracted
- methods Properties
- Placing business logic page, js methods are generally placed in the methods of
- computed property
- A method of calculating an attribute defined
- template properties
- Used to set the template will replace the page elements, including placeholder
- watch Properties
-
watch:function(new,old){ ... }
-
Monitor changes in the data in the data
-
Two parameters, return a new value, a return to old values
-
- render property
- Creating Virtual Dom
Reference: https://www.cnblogs.com/bgwhite/p/9297221.html
Vue 8 Method:
Initialization display
- *beforeCreate()
- *created()
- *beforeMount()
- *mounted()
Update Status: this.xxx = value
- *beforeUpdate()
- *updated()
Destruction vue example:. Vm $ destory ()
- *beforeDestory()
- *destoryed()
References: Silicon Valley is still _Vue family bucket
Also attached to one at right in FIG --->
Vue instruction 7:
- v-if conditions rendering instruction
- Bool value according to the expression thereafter determines whether the rendering element
- v-show
- And v-if similar, but it will render the elements behind the expression is false, and such elements will add css code: style = "display: none"
- V-else
- 必须跟在v-if/v-show指令之后,不然不起作用;如果v-if/v-show指令的表达式为true,则else元素不显示;如果v-if/v-show指令的表达式为false,则else元素会显示在页面上
- v-for
- 类似JS的遍历,用法为 v-for="item in items", items是数组,item为数组中的数组元素
- v-bind
- 这个指令用于响应地更新 HTML 特性,比如绑定某个class元素或元素的style样式,它的语法糖为 ':'
- v-on
- 用于监听指定元素的DOM事件,比如点击事件,它的语法糖为 '@'
- v-model
- 用于表单元素,进行双向数据绑定