Vue.js 1.0.12 发布,轻量级 JavaScript 框架
欢迎加入运维网交流群:263444886Vue.js 1.0.12 发布,更新如下:
新增
[*] 新的prop选项: coerce
你现在可以给prop定义一个coerce函数 - 每当prop在父类更新的时候,prop的值将会通过coerce函数。你可以将它理解为prop的单向过滤器,只是他被定义在了子类组件内。
[*]
export default {
props: {
msg: {
type: String,
coerce: function (val) {
return val + '' // cast potential values to a string
}
}
}
}
修复
[*]
#2001 fix IE9>
[*] #2015 handle 0 properly when using v-bind for input value
[*] #2017 prevent v-model syncing value on blur after fragment is removed
[*] #2021 improve template parser when parsing plain strings containing HTML entities
[*] #2022 fix v-show stuck when it is compiled on out-of-dom element
[*] #2023 avoid v-model attempting to sync value after debounce when it is already unbound
[*] #2026 fix v-pre error when used on component root node
[*] #2028 avoid debounce on blur for v-model
[*]
#2035 fix SVG>
[*] #2036 non-deep watchers now fire properly when an object's structure has been changed byVue.set or Vue.delete.
[*] #2042 fix v-bind when binding muted attribute on elements
Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。
主要特性:
[*] 可扩展的数据绑定
[*] 将普通的 JS 对象作为 model
[*] 简洁明了的 API
[*] 组件化 UI 构建
[*] 配合别的库使用
页:
[1]