feat(SubmitBar): decimal-length can be string

This commit is contained in:
陈嘉涵 2020-01-31 09:57:15 +08:00
parent 3c2afab6d8
commit 21a0d4e877
3 changed files with 8 additions and 8 deletions

View File

@ -75,15 +75,15 @@ Use slot to add custom contents.
| 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 `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-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` |
| 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` |
### Events

View File

@ -75,15 +75,15 @@ Vue.use(SubmitBar);
| price | 价格(单位分) | *number* | - |
| 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-type | 按钮类型 | *string* | `danger` |
| tip | 提示文案 | *string* | - |
| tip-icon | 左侧 [图标名称](#/zh-CN/icon) 或图片链接 | *string* | - |
| currency | 货币符号 | *string* | `¥` |
| decimal-length | 价格小数点后位数 | *number \| string* | `2` |
| disabled | 是否禁用按钮 | *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` |
### Events

View File

@ -109,11 +109,12 @@ SubmitBar.props = {
tipIcon: String,
loading: Boolean,
disabled: Boolean,
textAlign: String,
buttonText: String,
suffixLabel: String,
safeAreaInsetBottom: Boolean,
decimalLength: {
type: Number,
type: [Number, String],
default: 2,
},
currency: {
@ -124,7 +125,6 @@ SubmitBar.props = {
type: String,
default: 'danger',
},
textAlign: String,
};
export default createComponent<SubmitBarProps, {}, SubmitBarSlots>(SubmitBar);