Vue.js: 0.12.8 Release

Release date:
July 23, 2015
Previous version:
0.12.8-csp (released July 23, 2015)
Magnitude:
0 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in 0.12.8

yyx990803

Directory Browser for 0.12.8

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

Release Notes Published

New

  • Strict mode: When Vue.config.strict is set to true, asset lookup will be limited to the current component only. This means a component will only inherit assets from the inheritance chain (via Vue.extend), but not from their parents in the view hierarchy. When strict mode is enabled, assets should be either registered globally, or explicitly depended on by the component that needs them. When enforced, it could result in better encapsulated components in larger projects.

Improvements

  • Source code refactored for better minification when using module bundlers. See instructions.
  • Computed properties now have their values automatically cached, and is re-evaluated lazily only when needed. This avoids expensive computations being re-run multiple times when a dependency changes.
  • v-attr now also sets the corresponding property on the element if the property exists. For example, <input value="{{val}}"> will not only update the attribute, but also set the value property. If the element doesn't have a corresponding property for the bound attribute, it will not be set.
  • v-repeat now supports item in array syntax:
  <div v-repeat="item in array"></div>
  • props declarations can now specify twoWay: true, which will throw a warning if the prop's binding type doesn't match.
  • When providing default value for a prop, you can now provide a function that returns Object/Array values to avoid having the same reference shared across multiple vms. (#1032)
  • You can now prefix any prop attribute with data- and it will just work. For example, a prop named myProp can be supplied in the template as data-my-prop. (#1034)
  • Alternative asset option syntax: you can now use an Array to provide assets, but every asset must provide an id property in order to be registered. e.g.
  var myDirective = {
    id: 'some-dir',
    update: function () { /* ... */ }
  }

  new Vue({
    // ...
    directives: [myDirective]
  })
  // the above is equivalent to:
  new Vue({
    directives: {
      'some-dir': myDirective
    }
  })

Fixed

  • Fixed dependency tracking when $adding properties to objects nested inside arrays.
  • #1028 v-cloak not removed correctly on conditionally compiled elements.
  • #1044 "leaveCancelled" not called properly in transitions
  • #1063 path parser accepting invalid path
  • #1065 class interpolation and v-class not working together
  • #1067 two-way binding not properly stabilized
  • #1071 & #1072 props default values not respected when data option is also present