创立一个vue实例:

const vm = new Vue(options)vm:vue的一个实例vm的构造函数是Vue,依照ES6的说法,vm所属的类是Vueoptions是 new Vue 的参数,咱们个别称之为选项或者结构选项

options的五大属性:
数据属性:

data-外部数据:    反对对象和函数,优先应用函数methods-办法:    事件处理函数或者是一般函数computed:watch:props-内部数据(属性):propsData:

DOM属性:

el-挂载点:    只在用new创立实例时失效    能够用$mount() 代替template:render:renderError:

生命周期钩子:

生beforeCreate、 created、beforeMount、 mounted、 beforeUpdate、 updated、activated、 deactivated、 beforeDestroy、 destroyed、errorCaptured

资源属性:

directives、 filters、 components-组件:

组合属性:

parent, mixins、 extends、 provide、 inject