Browse Source

Merge branch 'next' of https://github.com/jdf2e/nutui into next

suzigang 3 years ago
parent
commit
abd702c854
2 changed files with 2 additions and 1 deletions
  1. 1 1
      src/packages/__VUE/tabbar/doc.md
  2. 1 0
      src/packages/__VUE/tabbaritem/index.vue

+ 1 - 1
src/packages/__VUE/tabbar/doc.md

@@ -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    |

+ 1 - 0
src/packages/__VUE/tabbaritem/index.vue

@@ -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;