An open API service indexing awesome lists of open source software.

https://github.com/anthinkingcoder/cutout-view

cutout content
https://github.com/anthinkingcoder/cutout-view

Last synced: 4 months ago
JSON representation

cutout content

Awesome Lists containing this project

README

          

# cutout-view
> this is a vue component, its help us to cut out content.
## Installation
use npm
```bash
npm i cutout-view --save
import cutout from 'cutout-view'
Vue.use(cutout)
```
## cutout Component
### props
| param | description | type | default |
| :-: | :-: | :-: | :-: |
| show-height | show 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-cancel | Number,String | 0 |
| on | if false, the cutout will be canceled,emitter @on-cancel | Boolean | true |
| layer-height | the bottom layer height | Number,String | 80px |

### events
| name | description | return value |
| :-: | :-: | :-: |
| on-cancel | Emitted when cutout is canceled| return false |

### slot
| name | description|
| :-: | :-: |
| layer | the layer area content |
| extra | extra content, at the bottom of the layer area|

## example

> see [live demo](https://jsfiddle.net/anthinkingcoder/c4guaq1n)
```html







关注作者查看全文


//...content

```
```javascript
var app = new Vue({
el: '#app',
data: {
on: true
},
methods: {
open() {
this.on = false;
},
cancel() {
console.info('cancel cutout');
}
}
})
```