feat: add ShareSheet component

This commit is contained in:
chenjiahan
2020-04-09 13:09:32 +08:00
committed by neverland
parent 8144e3de50
commit 5080761cfe
8 changed files with 356 additions and 1 deletions
+46
View File
@@ -0,0 +1,46 @@
# ShareSheet
### Install
```js
import Vue from 'vue';
import { ShareSheet } from 'vant';
Vue.use(ShareSheet);
```
## Usage
### Basic Usage
## API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| options | Share options | *Option[]* | `[]` |
| title | Title | *string* | - |
| cancel-text | Cancel button text | *string* | `'Cancel'` |
| description | Description | *string* | - |
### Data Structure of Option
| Key | Description | Type |
|------|------|------|
| name | Option name | *string* |
| icon | Option iconcan be set to `wechat` `link` `qrcode` `poster` or image URL | *string* |
### Events
| Event | Description | Arguments |
|------|------|------|
| select | Triggered when click option | *option: Option, index: number* |
| cancel | Triggered when click cancel button | - |
### Slots
| Name | Description |
|------|------|
| title | Custom title |
| description | Custom description |