0.0.7 • Published 7 years ago
v-readmore v0.0.7
v-readmore
The v-readmore component is a component for toggle the display according to the height.
Demo
in preparation. (v-readmore/examples)
Installation
$ npm install --save v-readmore
# or
$ yarn add v-readmoreUsage
Import
VReadmoreand install it in Vue constructor.import Vue from 'vue' import VReadmore from 'v-readmore' Vue.use(VReadmore) new Vue({ // ... })Use
<v-readmore>component in your apps.<template> <v-readmore> <li v-for="i in 30" :key="i">item - {{ i }}</li> </v-readmore> </template>
Auto installing v-readmore
If you have Vue constructor on window, you don't need to call Vue.use(VReadmore) since it will be called automatically. This is the case when you load Vue.js and v-readmore via <script> element.
References
<v-readmore> component
Props
collapsedHeight- NumberOptional - You can specify the height to enable readmore
Slots
(default)- main content.moreLink- more button element.lessLink- less button element.
License
MIT