refactor(core): and cover
This commit is contained in:
parent
fbd51afdcb
commit
27e7e749af
6 changed files with 69 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { merge } from '../util/core'
|
||||
import { parseQuery, stringifyQuery, cleanPath } from './util'
|
||||
import { parseQuery, stringifyQuery } from './util'
|
||||
|
||||
function replaceHash (path) {
|
||||
const i = window.location.href.indexOf('#')
|
||||
|
|
|
|||
|
|
@ -39,10 +39,13 @@ export function initRoute (vm) {
|
|||
on('hashchange', _ => {
|
||||
normalize()
|
||||
vm.route = parse()
|
||||
|
||||
if (lastRoute.path === vm.route.path) {
|
||||
// TODO: goto xxx
|
||||
return
|
||||
}
|
||||
|
||||
vm._fetchCover()
|
||||
vm._fetch()
|
||||
lastRoute = vm.route
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue