Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabbar-item 的 link 报错 #295

Closed
soffchen opened this issue Jun 23, 2016 · 4 comments
Closed

tabbar-item 的 link 报错 #295

soffchen opened this issue Jun 23, 2016 · 4 comments

Comments

@soffchen
Copy link

Version

0.1.1

Android or iOS, which browser?

Safari/Chrome

Your Codes

<tabbar-item link="found.html" selected>

报错:

TypeError: undefined is not an object (evaluating 'n.go')
o index.js: 390
on-item-click index.js: 376
$emit vue.min.js: 1763
onItemClick index.js: 455:89
@airyland
Copy link
Owner

麻烦确认是v0.1.1的版本。本地测试无报错,所以最好提供下完整一点的代码。

@soffchen
Copy link
Author

soffchen commented Jun 23, 2016

dist/components/tabbar-item/index.js: 390

        function o(t, n) {
            if (!/^javas/.test(t) && t) {
                var e = "object" === ("undefined" == typeof t ? "undefined" : (0, c["default"])(t)) || "string" == typeof t && !/http/.test(t);
                e?n.go(t):window.location.href=t
            }
        }

n.go 报错

@soffchen
Copy link
Author

    <tabbar>
      <tabbar-item link="found.html" selected>
        <img slot="icon" src="img/binoculars.png" width="24">
        <span slot="label">Found</span>
      </tabbar-item>
      <tabbar-item link="lost.html">
        <img slot="icon" src="img/lostfound.png" width="24">
        <span slot="label">Lost</span>
      </tabbar-item>
      <tabbar-item link="mine.html">
        <img slot="icon" src="img/contacts.png" width="24">
        <span slot="label">Mine</span>
      </tabbar-item>
    </tabbar>
<script src="dist/components/x-header/index.js"></script>
<script src="dist/components/tabbar/index.js"></script>
<script src="dist/components/tabbar-item/index.js"></script>

<script>
  Vue.component('x-header', vuxXHeader)
  Vue.component('tabbar', vuxTabbar)
  Vue.component('tabbar-item', vuxTabbarItem)
  new Vue({
    el: '#main'
  })
</script>

@airyland
Copy link
Owner

try v0.1.2-rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants