bk-showmore
v1.0.6
Published
a solution of hidden overflow content
Downloads
5
Readme
ShowMore
Solution of ‘show more‘.
Installation
npm install bk-showmoreCommonJS
const ShowMore = require('bk-showmore')ESM
import ShowMore from 'bk-showmore'Usage
<div id="app">
<!-- this span can deal by showmore solution -->
<span class="showmore"></span>
</div>ShowMore({
wrap: '#app', // specify a scope, its childNode with class=“showmore” would have custom overflow solution
callback: callback, // callback when click 'showmore' button
isMultiline: true, // is Mulitiline situation, default by true
text: 'showmore', // 'showmore' button's text
color: 'deepskyblue' // 'showmore' button's color
})// need to use after the real DOM is rendered
// an example in Vue3
onMounted(() => {
nextTick(() => {
ShowMore({
wrap: '#app'
})
})
})
