{"bugs":{"url":"https://github.com/raxjs/universal-api/issues"},"dist":{"shasum":"09a17528c94451500d026c91025d4df44ff8dd31","tarball":"https://registry.npmjs.org/@uni/action-sheet/-/action-sheet-1.0.4-beta.tgz","fileCount":40,"integrity":"sha512-mp9IufI9E/2FJdcUDYN/dKND5nWDP1VMGNm+nQpevlRjDng3NYk3TdgMdRn96UX94LQVxvAdm645PVUPGdTL1A==","signatures":[{"sig":"MEQCIA2HtF2oqdv4WV27+dAol2f0fF/Puii77L9tovQcFDX4AiAgjhTjZnrCh6kM7EuduTP9m8BDeIZkuG+IPGCb8WcWcw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpMQwCRA9TVsSAnZWagAA/18P/2mAgxf89dCKPh9aW9Jl\n2raAD9AyVq7dMBxq0Sv6q9AjXWDSceNFiZXb0jWVVCU6pJtsayO0JGo2Y8om\n9G289AQjS2K03vQxwZx0/wFGLIncB/YtVm0Yl6wkhZkASKw8QEY04Qs885xB\n6WNlfxGvznFF8s+kcl65f6CT+BMbo3zZsEli5f+GjxMjmj9wYebrZFgkCEtA\nc52+LE4gJ5O7UGw3QQXOYIySvbbR+CP6FLw0QZyr/IxUbVvjOSpUy9NuF8+M\nULBKbWwDZBaGPZgvlDNWpl8N4IWvgX9ycWXbaWTBNDmNff8pKHpkXdwkWect\nkJ6SPthbnZIA/h3EyJlvUCJ+DOyyQoZWoHh1C4A9O08j2hLttaVVBbmqp1/I\nslvfV4NtI82BbLUIOhaTrZ1SvrEwD+qoScfS7iOQAc+cIBI8gyGt/DA7q8pK\n0I998iklk03cR7Qk4Bh+8XeBwELTh3uXtcWtucp5eym6TD4wsc0WapR1sNFJ\n+j0eFTDdBr+OSJT7gJS+GjOeJvswOr/yioJuuWfRxtaRKnpquscn2khunI6T\nwr2GMM0Eov70TYCpbUP4Vb1JEYZ49Az5abR+kUxf1WVanW1htbCM/1dXiDrR\ntTXqwSCqr2WUVzAn6QGyNqKACB4nEf9L5bwHnuXQ7qKqjAgtR9bYu7186emk\njwqS\r\n=tfBh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@uni/action-sheet","unpkg":"dist/index.js","author":{"name":"rax"},"module":"es/index.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=\"browser\" src=\"https://gw.alicdn.com/tfs/TB1uYFobGSs3KVjSZPiXXcsiVXa-200-200.svg\" width=\"25px\" height=\"25px\" /> <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","exports":{".":{"web":"./es/web/index.js","default":"./es/index.js","miniapp":"./es/ali-miniapp/index.js","bytedance-microapp":"./es/bytedance-microapp/index.js","wechat-miniprogram":"./es/wechat-miniprogram/index.js"},"./*":"./*"},"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":"rax-publisher","email":"rax-public@alibaba-inc.com"},{"name":"bunko","email":"2leg@immaster.cn"}],"sideEffects":false,"_nodeVersion":"14.4.0","dependencies":{"@uni/env":"^1.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.en-US.md","_npmOperationalInternal":{"tmp":"tmp/action-sheet_1.0.4-beta_1621410863567_0.5570213368844554","host":"s3://npm-registry-packages"},"_id":"@uni/action-sheet@1.0.4-beta","version":"1.0.4-beta"}