Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milk-ui/milkui-actionsheet
ActionSheet for milk ui.
https://github.com/milk-ui/milkui-actionsheet
Last synced: 8 days ago
JSON representation
ActionSheet for milk ui.
- Host: GitHub
- URL: https://github.com/milk-ui/milkui-actionsheet
- Owner: milk-ui
- License: mit
- Created: 2017-05-21T06:17:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T15:49:41.000Z (about 7 years ago)
- Last Synced: 2024-04-27T05:04:48.857Z (7 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# milkui-actionsheet
[![npm version](https://img.shields.io/npm/v/milkui-actionsheet.svg?style=flat)](https://www.npmjs.com/package/milkui-actionsheet) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](README.md)
[![NPM](https://nodei.co/npm/milkui-actionsheet.png?downloads=true&downloadRank=true)](https://nodei.co/npm/milkui-actionsheet/)
> 从底部弹出的模态框,提供和当前场景相关的 2 个以上的操作动作,也支持提供标题和描述。内置固定的展示样式、不支持特别灵活的修改。
## Overview
![image](https://user-images.githubusercontent.com/11053605/28750873-9b808ecc-752a-11e7-80a0-e198dd84392c.png)
## Example
```js
import ActionSheet from 'milkui-actionsheet';const { show } = this.state;
const actions = [
{ label: '控制台打印1', onClick: () => { console.info('1'); } },
{ label: '控制台打印2', onClick: () => { console.info('2'); } },
];```
## Properties
| Property | Type | Description | Default |
| -- | -- | -- | -- |
| className | String | 自定义的 class 类名 | '' |
| actions | Array | 动作项数组,label 属性必填 | [] |
| onHideSheet | Function | 关闭动作面板时的回调函数 | false |
| show | Boolean | 是否显示 | false |## Develop
```bash
cnpm i milk-dev -g # dev toolcnpm install
npm start
```## Links
- [Issues](https://github.com/milk-ui/milkui-actionsheet/issues)