1.0.1 • Published 7 years ago

vue-slide-options v1.0.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

vue-slide-options

dependence: webpack, vue-loader

npm.io

START UP

INSTALL

npm i vue-slide-options

BASIC USAGE

<vue-slide-options>
    <div slot="cover">an item 一个列表</div>
    <div slot="options">an options 一个选项</div>
</vue-slide-options>

SLOT

npm.io

  • cover: NEEDED
    • the element seen as the cover,like the chat list in the example image
  • options:
    • the element hiding under the cover laying at the right side

PROPS

propsneededtypedefaultdescription
thresholdnoNumber0.50.5 means when touch move distance >= 0.5* options.width, when finger leave it will auto-slide to show all options, IF < ,auto-slide to hide them all
speednoNumber0.20.2 means finish auto-slide in 0.2s

METHODS

  • close
    • close the opening option
<vue-slide-options ref="mySlide">
    <div slot="cover">an item 一个列表</div>
    <div slot="options">an options 一个选项</div>
</vue-slide-options>

<script>
// use
this.refs.mySlide.close()
</script>