bhuh12 / vue-router-tab

Vue.js tab components, based on Vue Router.

Home Page:https://bhuh12.github.io/vue-router-tab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue 2.5.22 tab-item报错

serializedowen opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Development Environment (please complete the following information):

  • Node.js: [e.g. v12.4.0]
  • Vue: [e.g. v2.5.22]
  • Vue Router [e.g. v3.0.1]
  • Vue Router Tab [e.g. v0.2.0]

Operating Environment (please complete the following information):

  • Device: [e.g. Desktop]
  • OS: [e.g. Windows 10]
  • Browser [e.g. stock browser, Chrome]
  • Version [e.g. 75]

Additional context
Add any other context about the problem here.

image
image

图中为vue.esm.js中的resolveScopedSlots 方法
上图为vue2.6.x 下图为vue2.5.x 2.5中未处理scopedSlot返回null的情况,导致TabItem无法渲染。

低版本的 vue 模板编译 slot插槽方式不一样。你先将 package.jsonvue-template-compiler 依赖版本改成这个试试:

{
  "devDependencies": {
    "vue-template-compiler": "^2.6.10"
  }
}

Originally posted by @bhuh12 in #61 (comment)

嗯嗯 改了是可以。。我是觉得本身可以做下适配 毕竟写着是兼容2.5的

该问题已在 v1.2.3 版本修复,欢迎更新验证

更新日志:
https://bhuh12.gitee.io/vue-router-tab/zh/guide/changelog.html