Skip to content

Commit

Permalink
fix(router): 修复hash模式下tabbar不展示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Littly committed Sep 26, 2019
1 parent f176784 commit 61dc79a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/taro-components/src/components/tabbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ class Tabbar extends Nerv.Component {
const routerBasename = this.props.conf.basename || '/'
let url
if (routerMode === 'hash') {
url = location.hash
const href = window.location.href
const hashIndex = href.indexOf('#')
url = hashIndex === -1
? ''
: href.substring(hashIndex + 1)
} else if (routerMode === 'multi') {
url = currentPagename
} else {
Expand Down

0 comments on commit 61dc79a

Please sign in to comment.