vue-clamp
vue-clamp copied to clipboard
vue-clamp not work with el-tabs in element-ui
I am using vue-clamp with tab component in element-ui, like following,
<el-tabs>
<el-tab-pane label="Tab 1">
a
</el-tab-pane>
<el-tab-pane label="Tab 2">
<v-clamp :max-lines="3">
bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb
</v-clamp>
</el-tab-pane>
<el-tab-pane label="Tab 3">
c
</el-tab-pane>
</el-tabs>
if vue-clamp is placed in tab1, vue-clamp will be loaded and calculate the height when page initializes at first. But if vue-clamp is placed in tab2, it will not work and text in vue-clamp is wholly displayed.