refactor(core): and sidebar event

This commit is contained in:
qingwei.li 2017-02-18 16:18:07 +08:00 • committed by cinwell.li
commit fbd51afdcb
6 changed files with 100 additions and 17 deletions

View file

@ -38,11 +38,12 @@ export function initRoute (vm) {
on('hashchange', _ => {
normalize()
lastRoute = vm.route = parse()
vm.route = parse()
if (lastRoute.path === vm.route.path) {
// TODO: goto xxx
return
}
vm._fetch()
lastRoute = vm.route
})
}