1.0.6 • Published 2 years ago

bk-showmore v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ShowMore

Solution of ‘show more‘.

Installation

npm install bk-showmore

CommonJS

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'
    })
  })
})
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago