feat(render): add auto header

This commit is contained in:
qingwei.li 2017-02-18 21:59:19 +08:00 • committed by cinwell.li
commit b7768b1b3c
6 changed files with 50 additions and 26 deletions

View file

@ -1,5 +1,5 @@
import { merge, cached } from '../util/core'
import { parseQuery, stringifyQuery } from './util'
import { parseQuery, stringifyQuery, cleanPath } from './util'
function replaceHash (path) {
const i = window.location.href.indexOf('#')
@ -70,5 +70,5 @@ export function toURL (path, params) {
route.query = merge({}, route.query, params)
path = route.path + stringifyQuery(route.query)
return '#' + path
return cleanPath('#/' + path)
}