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

vue-clamp not work with el-tabs in element-ui #52

Open
StarkShang opened this issue Jan 13, 2021 · 1 comment
Open

vue-clamp not work with el-tabs in element-ui #52

StarkShang opened this issue Jan 13, 2021 · 1 comment

Comments

@StarkShang
Copy link

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.

@Justineo
Copy link
Owner

Have you tried to use the autoresize prop?

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