# chanjet-plugin-alert

> 在Mutants框架中,为chanjet平台提供读取短信的API

Latest version **1.0.0** (published 2016-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install chanjet-plugin-alert
pnpm add chanjet-plugin-alert
yarn add chanjet-plugin-alert
bun add chanjet-plugin-alert
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-09-13 |
| First published | 2016-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | TonyJiang |
| Maintainers | chanjetsdp |

## Links

- npm: https://www.npmjs.com/package/chanjet-plugin-alert
- npm.io page: https://npm.io/package/chanjet-plugin-alert

## Dependencies (2)

- [chanjet-env-check](https://npm.io/package/chanjet-env-check.md) 1.0.0
- [chanjet-plugin-base](https://npm.io/package/chanjet-plugin-base.md) 1.0.0

## Recent versions

- 1.0.0 (latest) — 2016-09-13
- 0.0.8 — 2016-09-08

## README

# 本地弹出框API  `chanjet-plugin-alert`

在mutants框架中,  提供本地弹出框的api , 只在chanjet平台上可用, 微信不提供此功能.

**不能脱离mutants框架单独使用.**



## 获取实例

```javascript
//通过mutants来获取插件实例
const plugin = mutants.plugin.alert;
```





## API

1. #### show 弹出对话框
   ##### 参数

   - options `Object` 设置选项
     - message `string` 弹出框提示内容
     - buttons `array` 底部要显示的按钮集合
     - `选填` {title:"", onClick: function}  左侧第一个按钮
     - `选填` {title:"", onClick: function}  中间按钮
     - `选填` {title:"", onClick: function}  右侧第一个按钮

buttons数组可以配置一项,两项,三项, 分别对应一个按钮, 两个按钮, 三个按钮。

## 用法

``` javascript

window.mutants.plugin.alert.show(
                {
                    message: "tttt",
                    buttons: [
                        {title: "aaa", onClick: function () {
                            alert('test click');
                        }},
                        {title: "bbb", onClick: function () {
                            alert('b click');
                        }},
                        {title: "ccc", onClick: ::this.fn1}
                    ]
                }
            )


```

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