Skip to content

1.0.0-beta.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 11 Oct 00:48
· 3591 commits to main since this release

About 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 of object.$set(key, value) and object.$delete(key), use the new global methods Vue.set(object, key, value) and Vue.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 uses track-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 use track-by="$index" to handle duplicate values.

  • v-for no longer converts the value to Array before piping it through filters. Custom filters used on v-for will now get the raw value. However, the built-in filterBy and orderBy 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 called reverse, and is now called order. A value that is greater than or equal to 0 indicates ascending order, a value smaller than 0 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.