红联Linux门户
Linux帮助

Vue v2.0.0-alpha.7发布,轻量级JavaScript框架

发布时间:2016-06-29 09:39:59来源:红联作者:baihuo
Vue v2.0.0 alpha.7 发布了,Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。

主要特性:

可扩展的数据绑定

将普通的 JS 对象作为 model

简洁明了的 API

组件化 UI 构建

配合别的库使用

本次发布的一些新增特性及使用示例:

Breaking Changes

The init lifecycle hook has been renamed to beforeCreated.

JavaScript transition hooks now receive the context Vue instance as the second argument:[code]Vue.transition('example', {
onEnter (el, vm) {
// ...
}
})
New[/code]$createElement can now omit the data argument if no data is needed. If the second argument is truthy and is not an Object, it will be treated as the children.[code]render (h) { // before
return h('div', null, 'hello') // after
return h('div', 'hello')
}[/code]SSR: Now supports bundle renderer, which runs a pre-bundled app script in a fresh context for each render. This eliminates the need for structuring your application without global state just for the sake of server-side rendering.

SSR: Now supports component-level caching via server.getCacheKey option.

Vue.config.errorHandler now also captures errors thrown in user watcher callbacks.

Fixed

#3140 fix v-model .number conversion for non-number input

fix CSS animation initial frame flash

fix SSR client-side hydration on merged text nodes

#3155 fix v-once when used with v-for

#3157 fix id-resolved transition with appear: true

软件详情:https://github.com/vuejs/vue/releases/tag/v2.0.0-alpha.7

下载地址:https://github.com/vuejs/vue/archive/v2.0.0-alpha.7.tar.gz

来自:开源中国社区
文章评论

共有 0 条评论