{"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"dist":{"shasum":"9591a9901afe35a9fcd35778b8fc45242b816640","tarball":"https://registry.npmjs.org/@uni/action-sheet/-/action-sheet-1.0.0-beta1.tgz","fileCount":25,"integrity":"sha512-bYjC8kOEYo4ALbRv6CUX3uxvp8DoAdi92QQNLybmDgHXnCmFImZb323r8XN3PfuoVC+8FLvPfR25RYsuxY+Wvg==","signatures":[{"sig":"MEUCIQDyVh1V6dZPB3SnFRlWhtmlbdshJTbWKnExyuqmjHTcKAIgZJnKUuVSx8a1pNwyxKhFBFbUNDlyrfz+bxReNsJdRPo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":197310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgOPBHCRA9TVsSAnZWagAAH3kP/iCRtSOmDRAHSGHMeadQ\nlBngROkDG6Z4KgXCcyEl0bN2WI6ORcse/wng+jLbnkphLvvXsdRLCfsCHqfO\nU5rbH+Wo3gWKiNLbxOPWVoQKy4du4fKzrd1G29/1Ph27QP3ZA77dffi5P3Ux\njzuh+lTCgsKv9BiO93r2oKoOrqTphIIaYJGSCiThw5aHzTK4Av/FsixqlNqu\ngXWxPp7ZgwfmLJcBJUiIUQu9YKP3EtGqf4fatwymNg/Q7jbmysxE4S2ZWCiY\n2KJSyIzbt1/YGm2L3H/cwyb/449QqqbO+M+gEwrPdHSkWJ77BblpIDPeE6v6\npjzh633bu3iZ5SbuiT4FZ9C52TFbWFZlc1VbcRUqq1d+48/5Nj3B5UQcvPKt\njptY0yVIHWDJyj7g2Pgw/m6VjqGq+onR+H7+pPciV4KEcib61qhBamy66StW\nqyomqQj6yDzImhYl4OQG+M0JRmk+BqHIQGxrvEbD5s36hmZitWLUg24vVDZx\n7AOsE9Sq6ChNg1uw14VWg4ijCLmBmEhUeeA2uKGBQcvbS9AqKozq2k0+BjNv\nyvaYiE9bYUhQg9n6WZg7ioz4AB4oQvyTSoHTs9hATL0BR6bQALSVQO6aTwza\n1ihcYXTCopqAcAhFjizqL/LUV5JH3/J6l96HEIWhqang7Mzr3ueiL3ah9pgs\npEGo\r\n=qZxD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"@uni/action-sheet","unpkg":"index.umd.js","author":{"name":"rax"},"module":"index.es.js","readme":"# actionSheet \n\n[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis)\n[![npm](https://img.shields.io/npm/v/@uni/action-sheet.svg)](https://www.npmjs.com/package/@uni/action-sheet)\n\nDisplays the operation menu.\n\n<div style=\"display: flex;flex-direction: row;justify-content: space-between;\">\n<div style=\"margin-right: 20px;\">\n\n## Supported\n\n<img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\"> <img alt=\"bytedanceMicroApp\" src=\"https://gw.alicdn.com/tfs/TB1jFtVzO_1gK0jSZFqXXcpaXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"bytedanceMicroApp\">\n\n## Install\n\n```bash\n$ npm install @uni/action-sheet --save\n```\nor\n```bash\n$ npm install @uni/apis --save\n```\n## Usage\n\n```javascript\nimport showActionSheet from '@uni/action-sheet';\n\nshowActionSheet({\n  itemList: ['A', 'B', 'C'],\n  success (res) {\n    console.log(res.tapIndex)\n  },\n  fail (res) {\n    console.log(res.errMsg)\n  }\n});\n\n// promise\nshowActionSheet({\n  itemList: ['A', 'B', 'C']\n}).then(res => {\n    console.log(res.tapIndex)\n});\n\n```\n\nYou can also import from the big package:\n\n```js\nimport { actionSheet } from '@uni/apis';\n```\n\n## Methods\n\n### `showActionSheet(options)`\n\n#### Arguments\n\n| Property | Type | Description | required | Default |\n| --- | --- | --- | --- | --- |\n| options | `object` |  | ✔️ | - |\n| options.itemList | `Array<string>`  | The text array of the button, with a length limited to 6 | ✔️ | - |\n| options.success | `Function`  | The callback function for a successful API call | ✘ | - |\n| options.fail | `Function`  | The callback function for a failed API call | ✘ | - |\n| options.complete | `Function`  | The callback function used when the API call completed (always executed whether the call succeeds or fails) | ✘ | - |\n\n#### Special Arguments\n\n| Property | Type | Description | required | Default | Supported |\n| --- | --- | --- | --- | --- | -- |\n| options.title | `string` | The title of actionsheet | ✘ |  | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" />  |\n| options.alertText | `string`  | The alert text | ✘ |  | <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\"> 2.14.0 |\n| options.itemColor | `string`  | The text color of the button\t | ✘ | #000000 | <img alt=\"wechatMiniprogram\" src=\"https://img.alicdn.com/tfs/TB1slcYdxv1gK0jSZFFXXb0sXXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"wechatMiniprogram\"> |\n| options.cancelButtonText | `string`  | The text of cancel button | ✘ | cancel | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> |\n| options.destructiveBtnIndex | `number`  | get more on [ali document](https://opendocs.alipay.com/mini/api/hr092g) | ✘ |  | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> no Dingding |\n| options.badges | `Array<Object>`  | get more on [ali document](https://opendocs.alipay.com/mini/api/hr092g) | ✘ |  | <img alt=\"miniApp\" src=\"https://gw.alicdn.com/tfs/TB1bBpmbRCw3KVjSZFuXXcAOpXa-200-200.svg\" width=\"25px\" height=\"25px\" title=\"ali miniprogram\" /> no Dingding |\n\n#### Return\n\n| Property | Type | Description |\n| --- | --- | --- |\n| tapIndex | `number` | The sequence number of the button tapped by the user, from top to bottom and starting from 0, The value is -1 when the mask or cancel button is clicked by the user |\n\n</div>\n<div>\n\n\n\n<div style=\"display: flex;margin-top: 50px;\">\n  <div>\n    <img src=\"https://img.alicdn.com/imgextra/i4/O1CN01yrQhve1aE4Tgjctph_!!6000000003297-0-tps-640-650.jpg\" width=\"200\" height=\"200\" />\n    <div style=\"text-align: center;\">wechat miniprogram</div>\n  </div>\n</div>\n\n</div>\n</div>\n","license":"BSD-3-Clause","typings":"types/index.d.ts","_npmUser":{"name":"bunko","email":"2leg@immaster.cn"},"homepage":"https://github.com/raxjs/universal-api#readme","repository":{"url":"git+ssh://git@github.com/raxjs/universal-api.git","type":"git"},"_npmVersion":"6.14.5","description":"[![npm](https://img.shields.io/npm/v/@uni/apis.svg)](https://www.npmjs.com/package/@uni/apis) [![npm](https://img.shields.io/npm/v/@uni/action-sheet.svg)](https://www.npmjs.com/package/@uni/action-sheet)","directories":{},"maintainers":[{"name":"bunko","email":"2leg@immaster.cn"}],"_nodeVersion":"14.4.0","dependencies":{"@babel/runtime-corejs3":"^7.11.0"},"_hasShrinkwrap":false,"readmeFilename":"README.en-US.md","peerDependencies":{"@uni/env":"^1.0.0-beta"},"_npmOperationalInternal":{"tmp":"tmp/action-sheet_1.0.0-beta1_1614344263501_0.5893482370279939","host":"s3://npm-registry-packages"},"_id":"@uni/action-sheet@1.0.0-beta1","version":"1.0.0-beta1"}