The principle vue-router

1. hash

Modify the time: history.pushState ( 'name', null, '/ xxx') || location.hash = '/ xxx'

Fallback time: window.addEventListener ( 'statepop' || 'hashchange')

 

2. history

Modify the time: history.pushState ( 'name', null, '/ xxx')

Fallback time: window.addEventListener ( 'statepop')

 

Guess you like

Origin www.cnblogs.com/amiezhang/p/11570259.html