From 21a0d4e877a10688e69b73a991f5657eb13fd4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Fri, 31 Jan 2020 09:57:15 +0800 Subject: [PATCH] feat(SubmitBar): decimal-length can be string --- src/submit-bar/README.md | 6 +++--- src/submit-bar/README.zh-CN.md | 6 +++--- src/submit-bar/index.tsx | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/submit-bar/README.md b/src/submit-bar/README.md index de76ee84b..c25eff2a9 100644 --- a/src/submit-bar/README.md +++ b/src/submit-bar/README.md @@ -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 diff --git a/src/submit-bar/README.zh-CN.md b/src/submit-bar/README.zh-CN.md index 7df52d6a7..3f9e68b0c 100644 --- a/src/submit-bar/README.zh-CN.md +++ b/src/submit-bar/README.zh-CN.md @@ -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 diff --git a/src/submit-bar/index.tsx b/src/submit-bar/index.tsx index 8d0cf9b76..7aed0abdd 100644 --- a/src/submit-bar/index.tsx +++ b/src/submit-bar/index.tsx @@ -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(SubmitBar);