1.0.0-beta.4
Pre-releaseAbout this Release
This is planned to be the last beta release. The first RC will be out next week and official release is planned for end of October.
The corresponding migration build for this release is 1.0.0-alpha.8.
1.0 documentation preview that matches this release is now available at rc.vuejs.org.
Changes from 1.0.0-beta.3
Breaking
-
Vue no longer extends
Object.prototypewith$setand$deletemethods. This has been causing issues with libraries that rely on these properties in certain condition checks (e.g. minimongo in Meteor). Instead ofobject.$set(key, value)andobject.$delete(key), use the new global methodsVue.set(object, key, value)andVue.delete(object, key). -
Instance method
vm.$addChild()has been deprecated. Instead, a new option,parenthas been (re)introduced. The usage is pretty simple:// before var child = parent.$addChild(options) // after var child = new Vue({ parent: parent })
-
The global config
protohas been deprecated. This has served no practical purpose and almost never used. -
v-forno longer usestrack-by="$index"behavior for Arrays of primitive values by default. It now uses the value itself as the cache key. As a result,v-forwill raise warning when the Array contains duplicate values and prompt the user to usetrack-by="$index"to handle duplicate values. -
v-forno longer converts the value to Array before piping it through filters. Custom filters used onv-forwill now get the raw value. However, the built-infilterByandorderByfilters will convert the values into Arrays, so any filters after them will received the converted Array values. -
The
orderByfilter now expects its second argument to be a number instead of a boolean. The argument was originally calledreverse, and is now calledorder. A value that is greater than or equal to0indicates ascending order, a value smaller than0indicates descending order. As a result, the old syntax for descending order still works:<li v-for="user in users | orderBy 'name' -1"> {{ user.name }} <li>
-
Global asset registration methods, e.g.
Vue.component, now returns the registered asset. This means you can now create, globally register and get reference to a component constructor in one step:var MyComponent = Vue.component('my-component', options) // equivalent to: var MyComponent = Vue.extend(options) Vue.component('my-component', MyComponent)
Non Breaking
-
v-oncan now handle multiple key modifiers:<input @keyup.enter.esc="onEnterOrEsc">
-
Directive modifiers are now exposed to custom directive instances as
this.modifiers:<div v-my-directive.one.two="xxx">
Vue.directive('my-directive', { bind: function () { this.modifiers.one // -> true this.modifiers.two // -> true } })
Fixed
- #1398 Use more reliable visibility check for transitions. This fixes situations where elements are stuck on leave if the parent element is not visible.
- #1399 Modifiers are no longer included in
this.argfor custom directives. - #1400 only warn twoWay prop binding type mismatch when the prop is present.