# lm-actionsheet

> * 作者：quying * 邮箱：qy9404@163.com * 版本：**`1.0.3`**

Latest version **1.0.3** (published 2020-06-05) · 0 weekly downloads

## Install

```sh
npm install lm-actionsheet
pnpm add lm-actionsheet
yarn add lm-actionsheet
bun add lm-actionsheet
```

## 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.3 |
| Published | 2020-06-05 |
| First published | 2017-11-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | quying |
| Maintainers | davidfeng, sherry.cao, xinzai, yingq |
| Keywords | earth, react, reactsfc, actionsheet |

## Links

- npm: https://www.npmjs.com/package/lm-actionsheet
- Repository: https://github.com/lm-component/actionsheet
- Homepage: https://github.com/lm-component/actionsheet#readme
- Issues: https://github.com/lm-component/actionsheet/issues
- npm.io page: https://npm.io/package/lm-actionsheet

## Dependencies (10)

- [lm-mask](https://npm.io/package/lm-mask.md) ^1.0.0
- [promise](https://npm.io/package/promise.md) 8.0.1
- [lm-model](https://npm.io/package/lm-model.md) ^0.2.0
- [lm-utils](https://npm.io/package/lm-utils.md) ^0.1.4
- [lm-portal](https://npm.io/package/lm-portal.md) ^0.2.1
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) 2.0.3
- [lm-reset-style](https://npm.io/package/lm-reset-style.md) ^2.0.2
- [pinkie-promise](https://npm.io/package/pinkie-promise.md) ^2.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-06-05
- 1.0.2 — 2020-06-04
- 1.0.1 — 2020-06-04
- 1.0.0 — 2020-06-02
- 0.2.0 — 2018-10-22
- 0.1.1 — 2017-11-01

## README

# actionsheet

* 作者：quying
* 邮箱：qy9404@163.com
* 版本：**`1.0.3`**

## 介绍

actionseet底部弹出动作面板

## 安装

`lm-*` 组件使用 `npm` 进行管理，命名空间统一为 `lm-`，请使用以下命令进行组件安装。

```
npm i lm-actionsheet --save
```

- 如果你还没有安装 `npm`，可通过以下方式进行 [安装](https://nodejs.org/en/download/)。
- 安装cnpm `npm install -g cnpm --registry=https://registry.npm.taobao.org`



## 使用

### 样例文档

- 待开发

### 使用
最少配置参数为：
- 传入`option`增加内容

```javascript
const options = {
    '选项一': ()=> console.log(1),
    '选项二': ()=> console.log(2)
}
```

```
//支持传入自定义标签
const label = <a href="http://www.baidu.com" >test</a>;

const options2 = [{
    label: label
}, {
    label: '选项一',
    callback: ()=> console.log(2)
}];
```

```
<Actionsheet 
    showState={ this.state.showState }
    options={ options }
    onDismiss={ this.onModelClick }
    onModelClick={ this.onModelClick }
/>

```
### 配置参数

| Prop | Type | Default | Description |
| ---- |:----:|:-------:| :----------:|
| **`visible`** | `bool` | `undefined` | 是否可见 |
| **`options`** | `obj` | `{}` | 选项对象列表 |
| **`onDismiss`** | `func` | `()=>{}` | 取消按钮回调 |
| **`onModelClick`** | `func` | `undefined` | model点击回调 |


## 注意事项

- mask相关属性见[lm-mask](https://github.com/lm-component/mask)



## 开发调试

进入项目目录后，使用 `node` 命令启动服务

```
npm run start
```

打包发布可通过 `node` 命令执行

```
npm run build
npm publish
```



## 相关资料

* [lm 组件开发规范](http://)


## Changelog

### 0.1.0
1. init

### 0.1.1
- 增加了弹出动画
- 遮罩层由modelHOC改为lm-mask

### 0.2.0
- update react to version 16

### 1.0.0
- 主要是样式修改，包括容器的内边距, 外弧度，背景颜色等

### 1.0.3
- update lm-mask组件最新版本, 维护样式
---

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