{"action":"created","issue":{"url":"https://api.github.com/repos/airyland/vux/issues/447","repository_url":"https://api.github.com/repos/airyland/vux","labels_url":"https://api.github.com/repos/airyland/vux/issues/447/labels{/name}","comments_url":"https://api.github.com/repos/airyland/vux/issues/447/comments","events_url":"https://api.github.com/repos/airyland/vux/issues/447/events","html_url":"https://github.com/airyland/vux/issues/447","id":168963105,"number":447,"title":"Tab 组件报 Uncaught TypeError: this.$parent.updateIndex is not a function 错误","user":{"login":"MouCai","id":6360305,"avatar_url":"https://avatars.githubusercontent.com/u/6360305?v=3","gravatar_id":"","url":"https://api.github.com/users/MouCai","html_url":"https://github.com/MouCai","followers_url":"https://api.github.com/users/MouCai/followers","following_url":"https://api.github.com/users/MouCai/following{/other_user}","gists_url":"https://api.github.com/users/MouCai/gists{/gist_id}","starred_url":"https://api.github.com/users/MouCai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MouCai/subscriptions","organizations_url":"https://api.github.com/users/MouCai/orgs","repos_url":"https://api.github.com/users/MouCai/repos","events_url":"https://api.github.com/users/MouCai/events{/privacy}","received_events_url":"https://api.github.com/users/MouCai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-02T19:05:00Z","updated_at":"2016-08-02T19:14:09Z","closed_at":null,"body":"### 版本 0.1.3-rc4\r\n\r\n### chrome 浏览器 \r\n\r\n版本号： 51.0.2704.103 (64-bit)\r\n\r\n### 代码\r\n\r\n``` html\r\n<template>\r\n  <tab>\r\n    <tab-item :selected=\"demo1 === '已发货'\" @click=\"demo1 = '已发货'\">已发货</tab-item>\r\n    <tab-item :selected=\"demo1 === '未发货'\" @click=\"demo1 = '未发货'\">未发货</tab-item>\r\n    <tab-item :selected=\"demo1 === '全部订单'\" @click=\"demo1 = '全部订单'\">全部订单</tab-item>\r\n  </tab>\r\n</template>\r\n\r\n<script>\r\nimport Tab from 'vux/src/components/tab';\r\nimport TabItem from 'vux/src/components/tab/tab-item';\r\nexport default {\r\n  data () {\r\n    return {\r\n      demo1: '未发货',\r\n    };\r\n  },\r\n  components: {\r\n    Tab,\r\n    TabItem,\r\n  },\r\n};\r\n</script>\r\n```\r\n\r\n### 报错，有如下提示\r\n```\r\nUncaught TypeError: this.$parent.updateIndex is not a function\r\n```\r\n\r\n### 还原步骤\r\n直接通过浏览器打开上述含有上述代码的 url 和通过 v-link 跳到含有上述代码的 url 都会触发\r\n"},"comment":{"url":"https://api.github.com/repos/airyland/vux/issues/comments/237012334","html_url":"https://github.com/airyland/vux/issues/447#issuecomment-237012334","issue_url":"https://api.github.com/repos/airyland/vux/issues/447","id":237012334,"user":{"login":"MouCai","id":6360305,"avatar_url":"https://avatars.githubusercontent.com/u/6360305?v=3","gravatar_id":"","url":"https://api.github.com/users/MouCai","html_url":"https://github.com/MouCai","followers_url":"https://api.github.com/users/MouCai/followers","following_url":"https://api.github.com/users/MouCai/following{/other_user}","gists_url":"https://api.github.com/users/MouCai/gists{/gist_id}","starred_url":"https://api.github.com/users/MouCai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MouCai/subscriptions","organizations_url":"https://api.github.com/users/MouCai/orgs","repos_url":"https://api.github.com/users/MouCai/repos","events_url":"https://api.github.com/users/MouCai/events{/privacy}","received_events_url":"https://api.github.com/users/MouCai/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T19:14:09Z","updated_at":"2016-08-02T19:14:09Z","body":"检查了下，是 tab 组件没有被正常引用所致，将\r\n``` html\r\nimport Tab from 'vux/src/components/tab';\r\nimport TabItem from 'vux/src/components/tab/tab-item';\r\n```\r\n替换为\r\n``` html\r\nimport { Tab, TabItem } from 'vux-components/tab';\r\n```\r\n就 OK 了"}}
{"actor":{"display_login":"MouCai"}}