We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
after
I need a clamped text with 'read more' button displayed as block element (like this)
So, when I use block element in after slot the vue-clamp hides more lines than needed.
vue-clamp
<v-clamp :max-lines="3" autoresize > {{ text }} <template #after="{ toggle, expanded, clamped }"> <div v-if="expanded || clamped" class="toggle btn btn-sm" @click="toggle" > Read more </div> </template> </v-clamp>
The text was updated successfully, but these errors were encountered:
It is expected in current version. You can move the block level element outside. In future versions we may offer more flexibility.
Sorry, something went wrong.
@Justineo it's not obvious, because it's said in the doc:
after Slot scope: Same as before. Content displayed after the clamped text. Can contain anything.
Please, change it to
after Slot scope: Same as before. Content displayed after the clamped text. Can contain inline-level element.
It should be said explicitly that the inline element is expected.
This fork may work as you expect? https://boyuai.github.io/vue-clamp/demo/
No branches or pull requests
I need a clamped text with 'read more' button displayed as block element (like this)
So, when I use block element in
after
slot thevue-clamp
hides more lines than needed.The text was updated successfully, but these errors were encountered: