Skip to content

Commit

Permalink
fix(router): 默认指定 h5 router mode 为 hash,close #7871
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam authored and Chen-jj committed Oct 21, 2020
1 parent 0537c9d commit 64361e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/taro-router/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { setHistoryMode } from './history'
import { RouterConfig } from './router'

export function init (config: RouterConfig) {
config.router.mode = config.router.mode || 'hash'
setHistoryMode(config.router.mode, config.router.basename)
Object.assign(routerConfig, config)
document.getElementById('app')?.remove()
Expand Down

0 comments on commit 64361e4

Please sign in to comment.