Skip to content

v2.6.0

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 17 Jun 15:58
· 851 commits to dev since this release

New Features

  • Now supports nesting abstract routers inside the main router app. Example

  • New route config options:

    • caseSensitive: makes the route match with case sensitivity.

    • pathToRegexpOptions: path-to-regexp options to use when compiling the match regex for this route.

    (@smitt04 via #1215)

  • When returning a selector in scrollBehavior, an additional offset object can also be specified:

    scrollBehavior (to, from, saved) {
      return {
        selector: '#foo',
        offset: { x: 0, y: 10 }
      }
    }

    (@sigerello via #1501)

  • New route instance option: fallback.

    Controls whether the router should fallback to hash mode when the browser does not support history.pushState. Defaults to true.

    Setting this to false essentially makes every router-link navigation a full page refresh in IE9. This is useful when the app is server-rendered and needs to work in IE9, because a hash mode URL does not work with SSR.

    (@JounQin via #1512)

Bug Fixes

  • Added TypeScript definition for linkExactActiveClass (@aicest via #1471)
  • Fix scrollBehavior receiving incorrect from parameter (@mutoo via #1479)
  • Prevent throwing Error when linking to non-existent named route (@posva via #1387)
  • Silence named route default child warning when redirecting (@decademoon via #1442)
  • Fix nested object comparison for queries (@posva via #1425)
  • Fix hash-mode replaceHash() when page has <base> (@daohoangson via #1396)
  • Fix <base> that includes HTTP(S) origin
  • Fix route alias for / and paths nested under /