docs: prettier all markdown files

This commit is contained in:
chenjiahan
2020-04-11 09:17:33 +08:00
committed by neverland
parent 48067f79db
commit 7f84f8a487
140 changed files with 4441 additions and 4723 deletions
+35 -40
View File
@@ -21,7 +21,7 @@ Vue.use(SwipeCell);
<van-cell :border="false" title="Cell" value="Cell Content" />
<template #right>
<van-button square type="danger" text="Delete" />
<van-button square type="primary" text="Collect"/>
<van-button square type="primary" text="Collect" />
</template>
</van-swipe-cell>
```
@@ -39,24 +39,19 @@ Vue.use(SwipeCell);
thumb="https://img.yzcdn.cn/vant/cat.jpeg"
/>
<template #right>
<van-button
square
text="Delete"
type="danger"
class="delete-button"
/>
<van-button square text="Delete" type="danger" class="delete-button" />
</template>
</van-swipe-cell>
<style>
.goods-card {
margin: 0;
background-color: @white;
}
.goods-card {
margin: 0;
background-color: @white;
}
.delete-button {
height: 100%;
}
.delete-button {
height: 100%;
}
</style>
```
@@ -86,15 +81,15 @@ export default {
break;
case 'right':
Dialog.confirm({
message: 'Are you sure to delete?'
message: 'Are you sure to delete?',
}).then(() => {
instance.close();
});
break;
}
}
}
}
},
},
};
```
## API
@@ -102,43 +97,43 @@ export default {
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| name `v2.0.4` | Identifier of SwipeCell | *number \| string* | - |
| left-width | Width of the left swipe area | *number \| string* | `auto` |
| right-width | Width of the right swipe area | *number \| string* | `auto` |
| before-close `v2.3.0` | Callback function before close | *Function* | - |
| disabled | Whether to disabled swipe | *boolean* | `false` |
| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | *boolean* | `false` |
| --- | --- | --- | --- |
| name `v2.0.4` | Identifier of SwipeCell | _number \| string_ | - |
| left-width | Width of the left swipe area | _number \| string_ | `auto` |
| right-width | Width of the right swipe area | _number \| string_ | `auto` |
| before-close `v2.3.0` | Callback function before close | _Function_ | - |
| disabled | Whether to disabled swipe | _boolean_ | `false` |
| stop-propagation `v2.1.0` | Whether to stop touchmove event propagation | _boolean_ | `false` |
### Slots
| Name | Description |
|------|------|
| default | custom content |
| left | content of left scrollable area |
| right | content of right scrollabe area |
| Name | Description |
| ------- | ------------------------------- |
| default | custom content |
| left | content of left scrollable area |
| right | content of right scrollabe area |
### Events
| Event | Description | Arguments |
|------|------|------|
| --- | --- | --- |
| click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) |
| open | Triggered when opened | { position: 'left' \| 'right' , name: string } |
| close | Triggered when closed | { position: string , name: string } |
### beforeClose Params
| Attribute | Description | Type |
|------|------|------|
| name | Name | *string* |
| position | Click positon (`left` `right` `cell` `outside`) | *string* |
| instance | SwipeCell instance | *SwipeCell* |
| Attribute | Description | Type |
| --------- | ----------------------------------------------- | ----------- |
| name | Name | _string_ |
| position | Click positon (`left` `right` `cell` `outside`) | _string_ |
| instance | SwipeCell instance | _SwipeCell_ |
### Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get SwipeCell instance and call instance methods
| Name | Description | Attribute | Return value |
|------|------|------|------|
| open | open SwipeCell | position: `left | right` | - |
| close | close SwipeCell | - | - |
| Name | Description | Attribute | Return value |
| ----- | --------------- | ------------------------ | ------------ |
| open | open SwipeCell | position: `left | right` | - |
| close | close SwipeCell | - | - |