Closed ghost closed 6 years ago
Translation of this issue:
Existing Component yes
Component Name El-tabs tab-bar
Description El-tabs initialization, tab-bar no display.
Can you please explain what exactly you want to achieve? If you are looking to hide tab bar, you can add custom class to el-tabs and hide it child element with class el-tabs__header. You can read more information about class binding in vue here: https://vuejs.org/v2/guide/class-and-style.html
el-tabs每个nav的下划线 不显示
https://github.com/ElemeFE/element/blob/v2.4.9/packages/tabs/src/tab-bar.vue
注释以下代码 正常显示
if (!this.$parent.$refs.tabs) return {};
vue的版本2.5.2
@mopkq 是 bug 的话,请描述你的问题,提供重现问题的链接。如果是新功能,也描述清楚一点。
@ziyoung @georgyfarniev 我是把源码 下载到本地 运行的
我猜是 tab-bar.vue源码if (!this.$parent.$refs.tabs) return {};
这个问题
vue $refs 的说明
An important note about the ref registration timing: because the refs themselves are created as a result of the render function, you cannot access them on the initial render - they don’t exist yet! $refs is also non-reactive, therefore you should not attempt to use it in templates for data-binding.
无法重现。 你打开这个例子再验证一下: https://jsfiddle.net/hyLzc5dp/
高亮的线宽度是0,导致不显示,有什么方式能解决?,除了手动赋值宽度
Existing Component
是
Component Name
el-tabs tab-bar
Description
el-tabs initialization, tab-bar no display.