docs: prettier all markdown files
This commit is contained in:
+24
-37
@@ -14,11 +14,7 @@ Vue.use(SubmitBar);
|
||||
### Basic Usage
|
||||
|
||||
```html
|
||||
<van-submit-bar
|
||||
:price="3050"
|
||||
button-text="Submit"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
<van-submit-bar :price="3050" button-text="Submit" @submit="onSubmit" />
|
||||
```
|
||||
|
||||
### Disabled
|
||||
@@ -41,12 +37,7 @@ Vue.use(SubmitBar);
|
||||
`submit` event will not triggerd when loading.
|
||||
|
||||
```html
|
||||
<van-submit-bar
|
||||
loading
|
||||
:price="3050"
|
||||
button-text="Submit"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
<van-submit-bar loading :price="3050" button-text="Submit" @submit="onSubmit" />
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
@@ -54,11 +45,7 @@ Vue.use(SubmitBar);
|
||||
Use slot to add custom contents.
|
||||
|
||||
```html
|
||||
<van-submit-bar
|
||||
:price="3050"
|
||||
button-text="Submit"
|
||||
@submit="onSubmit"
|
||||
>
|
||||
<van-submit-bar :price="3050" button-text="Submit" @submit="onSubmit">
|
||||
<van-checkbox v-model="checked">Check</van-checkbox>
|
||||
<template #tip>
|
||||
Some tips, <span @click="onClickEditAddress">Link</span>
|
||||
@@ -71,31 +58,31 @@ Use slot to add custom contents.
|
||||
### Props
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| price | Price | *number* | - |
|
||||
| label | Price left label | *string* | `Total:` |
|
||||
| suffix-label | Price right label | *string* | - |
|
||||
| text-align `v2.3.0` | Price label text align can be set to `left` | *string* | `right` |
|
||||
| button-text | Button text | *string* | - |
|
||||
| button-type | Button type | *string* | `danger` |
|
||||
| tip | Tip | *string* | - |
|
||||
| tip-icon | Icon | *string* | - |
|
||||
| currency | Currency symbol | *string* | `¥` |
|
||||
| decimal-length | number of digits to appear after the decimal point | *number \| string* | `2` |
|
||||
| disabled | Whether to disable button | *boolean* | `false` |
|
||||
| loading | Whether to show loading icon | *boolean* | `false` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `true` |
|
||||
| --- | --- | --- | --- |
|
||||
| price | Price | _number_ | - |
|
||||
| label | Price left label | _string_ | `Total:` |
|
||||
| suffix-label | Price right label | _string_ | - |
|
||||
| text-align `v2.3.0` | Price label text align can be set to `left` | _string_ | `right` |
|
||||
| button-text | Button text | _string_ | - |
|
||||
| button-type | Button type | _string_ | `danger` |
|
||||
| tip | Tip | _string_ | - |
|
||||
| tip-icon | Icon | _string_ | - |
|
||||
| currency | Currency symbol | _string_ | `¥` |
|
||||
| decimal-length | number of digits to appear after the decimal point | _number \| string_ | `2` |
|
||||
| disabled | Whether to disable button | _boolean_ | `false` |
|
||||
| loading | Whether to show loading icon | _boolean_ | `false` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
|------|------|------|
|
||||
| submit | Triggerd when click submit button | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------------- | --------- |
|
||||
| submit | Triggerd when click submit button | - |
|
||||
|
||||
### Slots
|
||||
|
||||
| Name | Description |
|
||||
|------|------|
|
||||
| Name | Description |
|
||||
| ------- | ------------------- |
|
||||
| default | Custom left content |
|
||||
| top | Custom top content |
|
||||
| tip | Custom tips |
|
||||
| top | Custom top content |
|
||||
| tip | Custom tips |
|
||||
|
||||
@@ -14,11 +14,7 @@ Vue.use(SubmitBar);
|
||||
### 基础用法
|
||||
|
||||
```html
|
||||
<van-submit-bar
|
||||
:price="3050"
|
||||
button-text="提交订单"
|
||||
@submit="onSubmit"
|
||||
/>
|
||||
<van-submit-bar :price="3050" button-text="提交订单" @submit="onSubmit" />
|
||||
```
|
||||
|
||||
### 禁用状态
|
||||
@@ -54,11 +50,7 @@ Vue.use(SubmitBar);
|
||||
通过插槽插入自定义内容
|
||||
|
||||
```html
|
||||
<van-submit-bar
|
||||
:price="3050"
|
||||
button-text="提交订单"
|
||||
@submit="onSubmit"
|
||||
>
|
||||
<van-submit-bar :price="3050" button-text="提交订单" @submit="onSubmit">
|
||||
<van-checkbox v-model="checked">全选</van-checkbox>
|
||||
<template #tip>
|
||||
你的收货地址不支持同城送, <span @click="onClickEditAddress">修改地址</span>
|
||||
@@ -71,31 +63,31 @@ Vue.use(SubmitBar);
|
||||
### Props
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| price | 价格(单位分) | *number* | - |
|
||||
| label | 价格左侧文案 | *string* | `合计:` |
|
||||
| suffix-label | 价格右侧文案 | *string* | - |
|
||||
| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | *string* | `right` |
|
||||
| button-text | 按钮文字 | *string* | - |
|
||||
| button-type | 按钮类型 | *string* | `danger` |
|
||||
| tip | 提示文案 | *string* | - |
|
||||
| tip-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | *string* | - |
|
||||
| currency | 货币符号 | *string* | `¥` |
|
||||
| decimal-length | 价格小数点后位数 | *number \| string* | `2` |
|
||||
| disabled | 是否禁用按钮 | *boolean* | `false` |
|
||||
| loading | 是否显示加载中的按钮 | *boolean* | `false` |
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `true` |
|
||||
| --- | --- | --- | --- |
|
||||
| price | 价格(单位分) | _number_ | - |
|
||||
| label | 价格左侧文案 | _string_ | `合计:` |
|
||||
| suffix-label | 价格右侧文案 | _string_ | - |
|
||||
| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | _string_ | `right` |
|
||||
| button-text | 按钮文字 | _string_ | - |
|
||||
| button-type | 按钮类型 | _string_ | `danger` |
|
||||
| tip | 提示文案 | _string_ | - |
|
||||
| tip-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - |
|
||||
| currency | 货币符号 | _string_ | `¥` |
|
||||
| decimal-length | 价格小数点后位数 | _number \| string_ | `2` |
|
||||
| disabled | 是否禁用按钮 | _boolean_ | `false` |
|
||||
| loading | 是否显示加载中的按钮 | _boolean_ | `false` |
|
||||
| safe-area-inset-bottom | 是否开启[底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | _boolean_ | `true` |
|
||||
|
||||
### Events
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
|------|------|------|
|
||||
| submit | 按钮点击事件回调 | - |
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
| ------ | ---------------- | -------- |
|
||||
| submit | 按钮点击事件回调 | - |
|
||||
|
||||
### Slots
|
||||
|
||||
| 名称 | 说明 |
|
||||
|------|------|
|
||||
| default | 自定义订单栏左侧内容 |
|
||||
| top | 自定义订单栏上方内容 |
|
||||
| tip | 提示文案中的额外操作和说明 |
|
||||
| 名称 | 说明 |
|
||||
| ------- | -------------------------- |
|
||||
| default | 自定义订单栏左侧内容 |
|
||||
| top | 自定义订单栏上方内容 |
|
||||
| tip | 提示文案中的额外操作和说明 |
|
||||
|
||||
Reference in New Issue
Block a user