0.0.2 • Published 7 years ago

cutout-view v0.0.2

Weekly downloads
6
License
-
Repository
-
Last release
7 years ago

cutout-view

this is a vue component, its help us to cut out content.

Installation

use npm

npm i cutout-view --save
import cutout from 'cutout-view'
Vue.use(cutout)

cutout Component

props

paramdescriptiontypedefault
show-heightshow content height,require, show-height not greater than content height and not less than layer-height。if the show-height valid error, will emitter @on-cancelNumber,String0
onif false, the cutout will be canceled,emitter @on-cancelBooleantrue
layer-heightthe bottom layer heightNumber,String80px

events

namedescriptionreturn value
on-cancelEmitted when cutout is canceledreturn false

slot

namedescription
layerthe layer area content
extraextra content, at the bottom of the layer area

example

see live demo

<cutout :show-height="800" :on="on" @on-cancel="cancel">
    <div slot="layer">
      <img src="./img/down.png" class="down-btn" @click="open">
    </div>
<div slot="extra" class="extra">
  <div class="button" @click="open">
    关注作者查看全文
  </div>
</div>
//...content