发布于 2015-09-12 00:31:57 | 98 次阅读 | 评论: 0 | 来源: 网友投递
Vue.js 轻量级 JavaScript 框架
Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。
Vue.js 1.0.0 Alpha 4 发布,最新的绑定语法请看 #1173
Literal directives now use the #=
syntax instead of .=
Prop binding type indicators are now placed in the attribute name instead of the value
v-el
and v-ref
are deprecated and now use dedicate syntax
v-component
has been deprecated in favor of the is
attribute, which is now usable on any element.
The prefix
global config has been deprecated.
v-else
: must be used following an element with v-if
.
<div v-if="ok">OK</div> <div v-else>NOT OK</div>
Unsafe delimiters for HTML interpolation can now be configured separately:
Vue.config.unsafeDelimiters = ['{!!', '!!}']
Note in 1.0.0-alpha when you set Vue.config.delimiters
, it will still implicitly update the unsafe delimiters following the current rules, but in 1.0.0-beta and above setting delimiters
will have no effect on unsafeDelimiters
.
Removed overly aggressive "unobservable object" warnings.
slot
attributes on transcluded content are now preserved.
Fixed issue where minified build calling non-existent deprecation warning when using legacy syntax
#1249 v-for
error when used with 3rd party sortable plugins (@weislanes)
#1268 component <slot>
not compiled in correct scope when inside v-for
#1282 <slot>
fallback content not compiled in correct scope when inside v-for
#1295 error when triggering transitions on fragments
FragmentFactory
is now exposed as Vue.FragmentFactory
.
User can now extend Vue's option merging strategies by adding functions to Vue.config.optionMergeStrategies
The above function will be called when calling Vue.extend({ myOptions: { ... }})
, or when applying a mixin that includes myOption
.
下载:https://github.com/yyx990803/vue/archive/1.0.0-alpha.4.zip
同时还发布了 vue.js 0.12.14 版本,主要是 bug 修复:
Removed overly aggressive "unobservable object" warnings
#1291 component attached
hook not called when toggled by v-if
inside transcluded content
#1299 v-model
options
rebuild error when using optgroups (@evantre)
下载:https://github.com/yyx990803/vue/archive/0.12.14.zip。
Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。
主要特性:
可扩展的数据绑定
将普通的 JS 对象作为 model
简洁明了的 API
组件化 UI 构建
配合别的库使用
支持的浏览器:https://saucelabs.com/u/vuejs