Vue.js: 0.12.2 Release

Release date:
June 25, 2015
Previous version:
0.12.1 (released June 16, 2015)
Magnitude:
2,954 Diff Delta
Contributors:
2 total committers
Data confidence:
Commits:

Top Contributors in 0.12.2

yyx990803
nervgh

Directory Browser for 0.12.2

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Breaking Changes

  • replace option now defaults to true. When you use a component in a parent template, the mount-point element will by default be replaced. This has a few implications:
    1. What you write in the component's template will be what gets eventually rendered.
    2. You should in most cases include a component's root element in its template. If the template has more than one top-level elements, or only contains text, it becomes a fragment instance.
    3. Remember the scoping rules still applies: attributes & directives on the mount-point element are compiled in parent scope; those on the root element inside the component's template are compiled in child scope.

If you prefer replace: false, or have trouble migrating to this behavior, you can modify the global default by setting Vue.options.replace = false.

Improvements

  • Props initialization has been prioritized; their initial values are now accesible in the created() hook and the data() function.
  • wait-for component param can now be used on static components too. Update docs
  • Partials are back, but with a new syntax that is more inline with the custom-element style API:
  <!-- static partial -->
  <partial name="my-partial"></partial>

  <!-- dynamic partial -->
  <partial name="{{partialId}}"></partial>
  • The restriction that v-component can only be used on table elements has been relaxed. It is still recommended to use custom-element syntax at all times - the v-component syntax should only be used in cases where the semantics demand it, e.g. on table/SVG elements, or a generic component that needs to be applied to different element types.

Fixed

  • Component that only contains <content></content> can now be rendered correctly.
  • props with data- prefix are now stripped and initialized correctly.
  • #948 Fix repeat instances incorrectly cahced using parent $key
  • #949 Fix incorrectly treating inline-template components that only contain one element as fragment instances.
  • #953 Fix currency filter floating point precision.
  • #961 Fix incorrectly treating prop paths that contain numbers as literal values