# quark-popup

> 移动端弹层组件，基于vue

Latest version **0.0.2** (published 2019-12-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install quark-popup
pnpm add quark-popup
yarn add quark-popup
bun add quark-popup
```

## 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.2 |
| Published | 2019-12-26 |
| First published | 2019-12-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yangkaixuan |
| Maintainers | yangkaixuan |

## Links

- npm: https://www.npmjs.com/package/quark-popup
- npm.io page: https://npm.io/package/quark-popup

## Recent versions

- 0.0.2 (latest) — 2019-12-26
- 0.0.1 — 2019-12-26

## README

# Popup 弹出层

介绍  
弹出层容器，用于展示弹窗、信息提示等内容，支持多个弹出层叠加展示

## 基本功能

```html
<nut-cell isLink title="展示弹出层" :showIcon="true" @click.native="show= true">
</nut-cell>
<nut-popup :style="{ padding: '30px 50px' }" v-model="show">正文</nut-popup>
```

```javascript
export default {
  data() {
    return {
      show: false
    };
  },

  methods: {
    showPopup() {
      this.show = true;
    }
  }
};
```

## 弹出位置

通过 position 属性设置弹出位置，默认居中弹出，可以设置为 top、bottom、left、right

```html
<nut-popup v-model="show" position="top" :style="{ height: '20%' }" />
```

## 圆角弹窗

设置 round 属性后，弹窗会根据弹出位置添加不同的圆角样式

```html
<van-popup v-model="show" round position="bottom" :style="{ height: '20%' }" />
```

## API

| 字段       | 说明                                     | 类型    | 默认值 |
| ---------- | ---------------------------------------- | ------- | ------ |
| v-model    | 当前组件是否显示                         | boolean | -      |
| overlay    | 是否显示遮罩层                           | boolean | true   |
| position   | 弹出位置，可选值为 top bottom right left | string  | center |
| duration   | 动画时长，单位秒                         | Number  | -      |
| round      | 是否显示圆角                             | boolean | -      |
| transition | 动画类名，等价于 transtion 的 name 属性  | string  | -      |

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