mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 02:16:12 +08:00
feat(SubmitBar): decimal-length can be string
This commit is contained in:
parent
3c2afab6d8
commit
21a0d4e877
@ -75,15 +75,15 @@ Use slot to add custom contents.
|
|||||||
| price | Price | *number* | - |
|
| price | Price | *number* | - |
|
||||||
| label | Price left label | *string* | `Total:` |
|
| label | Price left label | *string* | `Total:` |
|
||||||
| suffix-label | Price right label | *string* | - |
|
| suffix-label | Price right label | *string* | - |
|
||||||
| text-align `v2.3.0` | Price label text align can be set to `right` `left` | *string* | `right` |
|
| text-align `v2.3.0` | Price label text align can be set to `left` | *string* | `right` |
|
||||||
| button-text | Button text | *string* | - |
|
| button-text | Button text | *string* | - |
|
||||||
| button-type | Button type | *string* | `danger` |
|
| button-type | Button type | *string* | `danger` |
|
||||||
| tip | Tip | *string* | - |
|
| tip | Tip | *string* | - |
|
||||||
| tip-icon | Icon | *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` |
|
| disabled | Whether to disable button | *boolean* | `false` |
|
||||||
| loading | Whether to show loading icon | *boolean* | `false` |
|
| loading | Whether to show loading icon | *boolean* | `false` |
|
||||||
| currency | Currency symbol | *string* | `¥` |
|
|
||||||
| decimal-length | number of digits to appear after the decimal point | *number* | `2` |
|
|
||||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `false` |
|
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | *boolean* | `false` |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
@ -75,15 +75,15 @@ Vue.use(SubmitBar);
|
|||||||
| price | 价格(单位分) | *number* | - |
|
| price | 价格(单位分) | *number* | - |
|
||||||
| label | 价格左侧文案 | *string* | `合计:` |
|
| label | 价格左侧文案 | *string* | `合计:` |
|
||||||
| suffix-label | 价格右侧文案 | *string* | - |
|
| suffix-label | 价格右侧文案 | *string* | - |
|
||||||
| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `right` `left` | *string* | `right` |
|
| text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | *string* | `right` |
|
||||||
| button-text | 按钮文字 | *string* | - |
|
| button-text | 按钮文字 | *string* | - |
|
||||||
| button-type | 按钮类型 | *string* | `danger` |
|
| button-type | 按钮类型 | *string* | `danger` |
|
||||||
| tip | 提示文案 | *string* | - |
|
| tip | 提示文案 | *string* | - |
|
||||||
| tip-icon | 左侧 [图标名称](#/zh-CN/icon) 或图片链接 | *string* | - |
|
| tip-icon | 左侧 [图标名称](#/zh-CN/icon) 或图片链接 | *string* | - |
|
||||||
|
| currency | 货币符号 | *string* | `¥` |
|
||||||
|
| decimal-length | 价格小数点后位数 | *number \| string* | `2` |
|
||||||
| disabled | 是否禁用按钮 | *boolean* | `false` |
|
| disabled | 是否禁用按钮 | *boolean* | `false` |
|
||||||
| loading | 是否显示加载中的按钮 | *boolean* | `false` |
|
| loading | 是否显示加载中的按钮 | *boolean* | `false` |
|
||||||
| currency | 货币符号 | *string* | `¥` |
|
|
||||||
| decimal-length | 价格小数点后位数 | *number* | `2` |
|
|
||||||
| safe-area-inset-bottom | 是否开启 [底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `false` |
|
| safe-area-inset-bottom | 是否开启 [底部安全区适配](#/zh-CN/quickstart#di-bu-an-quan-qu-gua-pei) | *boolean* | `false` |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
@ -109,11 +109,12 @@ SubmitBar.props = {
|
|||||||
tipIcon: String,
|
tipIcon: String,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
|
textAlign: String,
|
||||||
buttonText: String,
|
buttonText: String,
|
||||||
suffixLabel: String,
|
suffixLabel: String,
|
||||||
safeAreaInsetBottom: Boolean,
|
safeAreaInsetBottom: Boolean,
|
||||||
decimalLength: {
|
decimalLength: {
|
||||||
type: Number,
|
type: [Number, String],
|
||||||
default: 2,
|
default: 2,
|
||||||
},
|
},
|
||||||
currency: {
|
currency: {
|
||||||
@ -124,7 +125,6 @@ SubmitBar.props = {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'danger',
|
default: 'danger',
|
||||||
},
|
},
|
||||||
textAlign: String,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default createComponent<SubmitBarProps, {}, SubmitBarSlots>(SubmitBar);
|
export default createComponent<SubmitBarProps, {}, SubmitBarSlots>(SubmitBar);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user