发布于 2016-01-31 00:49:17 | 205 次阅读 | 评论: 0 | 来源: 网友投递
Vue.js 轻量级 JavaScript 框架
Vue.js 是构建 Web 界面的 JavaScript 库,提供数据驱动的组件,还有简单灵活的 API,使得 MVVM 更简单。
Vue.js 1.0.16 发布,更新如下:
Improved v-for
re-rendering performance in production mode.
Vue Devtools is now supported in production builds as well.
New modifier for v-on
: .capture
. Attach the event listener in capture mode.
New modifier for v-on
: .self
. Only triggers the handler if the event was dispatched from the element itself, i.e. e.target === e.currentTarget
.
New modifier for v-bind
: .camel
, which converts the bound attribute name back to camelCase. This is a workaround for dynamically binding SVG valid camelCase attributes, e.g. viewBox
, because the browser parses :viewBox
as :viewbox
.
Example:
<svg :view-box.camel="viewBoxValue"></svg>
The .delete
key modifier for v-on
now also gets triggered on Backspace (which is "delete" on Mac keyboards). (@thecrypticace)
When manually creating a Vue instance, the props can be passed in via the data
option and it will no longer cause a warning.
#2144 when a inserted slot element is toggled off by v-if
, the slot's fallback content will be rendered instead.
#2169 when binding attributes with v-bind
, the boolean value true
now renders to an empty attribute value. This makes the rendered result more consistent with the HTML5 spec. If the value "true"
is desired, then the value passed to v-bind
should be an actual string rather than a boolean value. (@rhyzx)
#2199 fix v-model
jQuery < 1.7 compatibility
#2206 fix v-else
fragment not properly destroyed on instance teardown.
#2219 fix v-style
prefix detection for -webkit-filter
in Chrome.
#2242 fix literal prop handling for negative numbers when used on root instance.
#2253 templates that has comments outside the root node no longer gets parsed as fragment instances.
#2254 avoid asset resolution error when asset id is not a string
#2265 fix v-for range edge cases (when value is NaN)
下载页面:1.0.16