Skip to content

Commit

Permalink
fix(tabbar): solve (to href) priority issues(jd-opensource#1302)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 authored May 19, 2022
1 parent 05d3a53 commit 5c614f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/packages/__VUE/tabbar/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ app.use(TabbarItem);
| class-prefix | 自定义icon 类名前缀,用于使用自定义图标 | string | `nut-icon` |
| img | 标签页显示图片链接 | String | -- |
| active-img | 激活以后的标签页显示图片链接(同一个item中icon和img只能选择一个) | string | -- |
| href | 标签页的跳转链接 | string | -- |
| href | 标签页的跳转链接;如果同时存在 `to`,优先级高于 `to` | string | -- |
| to `小程序不支持` | 标签页的路由对象,等于 vue-router 的 [to 属性](https://router.vuejs.org/zh/api/#to) 属性 | string|object | -- |
| num | 页签右上角的数字角标,超出99之后为99+ | number | -- |
| dot | 是否显示图标右上角小红点 | boolean | false |
Expand Down
1 change: 1 addition & 0 deletions src/packages/__VUE/tabbaritem/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export default create({
setTimeout(() => {
if (parent.children[value].href) {
window.location.href = parent.children[value].href;
return;
}
if (parent.children[value].to) {
let to = parent.children[value].to;
Expand Down

0 comments on commit 5c614f5

Please sign in to comment.