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

max-line can't work right #7

Open
875817196 opened this issue Sep 5, 2023 · 2 comments
Open

max-line can't work right #7

875817196 opened this issue Sep 5, 2023 · 2 comments

Comments

@875817196
Copy link

875817196 commented Sep 5, 2023

想要的效果是最多只能展示三行,但是在 :max-lines=5的情况下最终只能展示一行,改成:max-lines=5才能最多展示三行

@875817196
Copy link
Author

875817196 commented Sep 5, 2023

<div class="summary_area"> <TextClamp :max-lines=5 autoresize :text="text" > <template #after="{ toggle, expanded, clamped }"> <div v-if="expanded || clamped" class="toggle btn btn-sm" @click="toggle" > {{ clamped ? "展开" : '收起' }} </div> </template> </TextClamp>

@ZXiaoR
Copy link

ZXiaoR commented Nov 9, 2023

before, after 需要使用行内元素

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