Vue.js 1.0.16 发布,轻量级 JavaScript 框架

jopen 9年前

Vue.js 1.0.16 发布,轻量级 JavaScript 框架

Vue.js 1.0.16 发布,更新如下:

New

  • 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

来自: http://www.oschina.net//news/70365/vue-1-0-6