Skip to content

v0.7.2

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 19 Oct 03:59
· 1462 commits to dev since this release

New

  • keep-alive now has experimental support on <router-view>.

  • All transition hooks, including the global before hook, will now be considered synchronous if: (1) The hook doesn't specify any argument; AND (2) The hook doesn't return a promise.

    For example, you can now provide a simple, synchronous global before hook:

    router.beforeEach(function (/* no argument */) {
      console.log('route changed!')
    })

    Or a synchronous activate hook:

    module.exports = {
      route: {
        activate: function (/* no argument */) {
          console.log('activated!')
        }
      }
    }

    Note if the hook specified a transition argument, then you still must call a transition method to resolve the hook.

    Also see updated docs for hook resolution rules.

Fixed

  • #187 Route data hook now only process the promise sugar syntax (returning an object containing promises) when the returned value is a plain object. This should fix cases where returning this.$http.get() using vue-resource throws warnings.
  • Fix waitForData not working if using promise sugar syntax in data hooks.
  • v-link in exact mode also matches path with a trailing slash. For example: v-link="{ path: '/a', exact: true }" will also match /a/.
  • Ensure component defined before router installation also gets access to $route.