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.prototype
with$set
and$delete
methods. 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,parent
has been (re)introduced. The usage is pretty simple:// before var child = parent.$addChild(options) // after var child = new Vue({ parent: parent })
-
The global config
proto
has been deprecated. This has served no practical purpose and almost never used. -
v-for
no 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-for
will raise warning when the Array contains duplicate values and prompt the user to usetrack-by="$index"
to handle duplicate values. -
v-for
no longer converts the value to Array before piping it through filters. Custom filters used onv-for
will now get the raw value. However, the built-infilterBy
andorderBy
filters will convert the values into Arrays, so any filters after them will received the converted Array values. -
The
orderBy
filter 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 to0
indicates ascending order, a value smaller than0
indicates 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-on
can 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.arg
for custom directives. - #1400 only warn twoWay prop binding type mismatch when the prop is present.