高层级的变化
- 模板解析器不再依赖于 DOM(除非你使用真正的 DOM 作为模板),因此只要你使用字符串模板,你将不再受到任何 1.0 版本中的解析限制。但是,如果你依赖在存在的内容中挂载一个元素作为模板(使用
el元素),你将依然受到这些限制。 - 编译器(将字符串模板转换为渲染方法的部分)和运行时间现在能够被分开。这里有两种不同的构建:
- 独立构建:包括编译并且运行。这种方式和
vue 1.0几乎完全一样。 - 运行时编译:由于它不包括编译器,在编译步骤时要么预编译模板,要么手动编写渲染功能。npm 包默认导出这个版本,那么你需要有一个编译的过程(使用
Browserify或Webpack),从中vueify或vue-loader将可以进行模板预编译。 
 - 独立构建:包括编译并且运行。这种方式和
 
全局配置
Vue.config.silentVue.config.optionMergeStrategiesVue.config.devtoolsVue.config.errorHandler(新 API,全局的挂钩用于在组件渲染和监控的时候处理未捕获的错误)Vue.config.keyCodes(新 API,为v-on配置自定义的key的别名)(已丢弃)Vue.config.debug(已丢弃)Vue.config.async(已丢弃)Vue.config.delimiters(已丢弃,使用Vue.config.unsafeDelimitersv-html)
全局 API
Vue.extendVue.nextTickVue.setVue.deleteVue.directiveVue.componentVue.useVue.mixinVue.compile(新 API,只能用于独立版本构建)Vue.transition(已丢弃,在staggerel上设置
Vue.filter(已丢弃,使用组件)Vue.elementDirective(已丢弃,使用功能组件)Vue.partial
选项
data
datapropspropdefault(已丢弃,如果你需要转换coerceprop,请使用compute属性)(已丢弃,prop binding modesv-model在组件上可以工作
propsData(新 API)只能用于实例computedmethodswatch
DOM
eltemplaterender(新 API)(已丢弃,组件现在必须有一个根元素)replace
生命周期钩子
(已丢弃,请使用initbeforeCreate)createdbeforeDestroydestroyedbeforeMount(新 API)mounted(新 API)beforeUpdate(新 API)updated(新 API)activated(新 API,用于keep-alive)deactivated(新 API 用于keep-alive)(已丢弃,使用readymounted)(已丢弃,迁移到activatevue-router)(已丢弃,使用beforeCompilecreated)(已丢弃,使用compiledmounted)(已丢弃)attached(已丢弃,同上)detached
Assets
directivescomponentstransitionsfilters(已丢弃)partials(已丢弃)elementDirectives
杂项
parentmixinsnameextendsdelimiters(新 API,替代原版的全局配置选项,只在独立构建中可用)functional(新 API)(已丢弃)events
实例方法
data
vm.$watch(已丢弃,直接检索值)vm.$get(已丢弃,使用vm.$setVue.set)(已丢弃,使用vm.$deleteVue.delete)(已丢弃,没有真正的使用)vm.$eval(已丢弃,同上)vm.$interpolate(已丢弃,使用vm.$logdevtools)
events
vm.$onvm.$oncevm.$offvm.$emit(已丢弃,使用全局的事件或使用vm.$dispatchvuex,见下面)(已丢弃,同上)vm.$broadcast
DOM
vm.$nextTick(已丢弃,在vm.$appendTovm.$el上使用本地 API)(已丢弃)vm.$before(已丢弃)vm.$after(已丢弃)vm.$remove
生命周期
vm.$mountvm.$destroy
指令
v-textv-html(注意三次括号被丢弃)v-ifv-showv-elsev-forkey(替代track-by)object v-forrange v-for- 参数顺序更新:数组中使用
(value, index) in arr,对象中使用(value, key, index) in obj 和$index被丢弃$key
v-onmodifiers- on child component
 - 自定义键码,目前版本
Vue.config.keyCodes代替原来的Vue.directive('on').keyCodes 
v-bind- 作为
prop xlink- 绑定对象
 
- 作为
 v-bind:styleprefix sniffing
v-bind:classv-modellazy(as modifier)number(as modifier)- `ignoring composition events
 (已丢弃,使用debouncev-on:input)
v-cloakv-prev-once(新 API)(已丢弃,现在只是一个特殊的属性v-refref)(和v-elref合并)
特殊组件
<component>:isasync组件inline-template
<transition><transition-group><keep-alive><slot>(已丢弃)partial
特殊属性
keyrefslot
服务器端渲染
renderToStringrenderToStreamclient-side hydration
翻译自2.0 Changes