# vue-m-layer

> vue2 mobile layer

Latest version **0.0.3** (published 2018-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-m-layer
pnpm add vue-m-layer
yarn add vue-m-layer
bun add vue-m-layer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-02-06 |
| First published | 2018-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | loshafee |
| Maintainers | shafee |
| Keywords | vue2, vue2-plugin, mobile-layer, layer |

## Links

- npm: https://www.npmjs.com/package/vue-m-layer
- Repository: https://github.com/loshafee/vue-layer
- Homepage: https://github.com/loshafee/vue-layer#readme
- Issues: https://github.com/loshafee/vue-layer/issues
- npm.io page: https://npm.io/package/vue-m-layer

## Recent versions

- 0.0.3 (latest) — 2018-02-06
- 0.0.2 — 2018-02-05
- 0.0.1 — 2018-02-05

## README

# vue-m-layer
Vue2 layer plugin

## Installtion

    npm install vue-m-layer --save

## Initialization

    import Vue from 'vue'
    import layer from 'vue-m-layer'
    Vue.use(layer)

## Examples

    this.$layer.open({
        content: 'show the layer in the view'
    })

## API
layer.v version

layer.open(options) display the layer
* `options` (`Object`)
        
    * `type` (`Number`) layer type，0 represents message，1 represents loading(defaults to `0`)
    * `content` (`String`) layer text content
    * `title` (`String/Array`) layer title，it can be a `string` or `array` which length is two. as follows: ['title', 'background-color: #eee;'] the second parameter sets the title style(defaults to null).
    * `time` (`Number`) the seconds about closing the layer (defaults no closing)
    * `style` (`String`) custom layer style
    * `className` (`String`) add a className to layer element
    * `btn` (`String/Array`) no setting no diaplay. set one as `btn: 'button'`, if two, then set `btn: ['btn-one', 'btn-2'] `
    * `shade` (`Boolean`) show the mask(defaults to `true`)
    * `shadeClose` (`Boolean`) click the mask close the layer(defaults to `true`)
    * `loadingTips` (`String`) the strings tips in loading(defaults to `null`)
    * `yes` (`Function`) the first button's handled function
    * `no` (`Function`) the seconds button's handled function
    * `success` (`Function`) display the layer callback function

Returns a id about this layer.

layer.close(id) closing the layer
* id, optional the function `layer.open` returns id

layer.closeAll() close all layers

## Reference
Refer [layer](http://layer.layui.com/mobile/api.html)

## License
MIT

---
_Source: https://npm.io/package/vue-m-layer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
