diff --git a/src/submit-bar/README.md b/src/submit-bar/README.md index 2d8d0eaa9..4da09efd4 100644 --- a/src/submit-bar/README.md +++ b/src/submit-bar/README.md @@ -65,6 +65,7 @@ Use slot to add custom contents. | 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` | +| button-color `v2.9.1` | Button color | _string_ | - | | tip | Tip | _string_ | - | | tip-icon | Icon | _string_ | - | | currency | Currency symbol | _string_ | `¥` | diff --git a/src/submit-bar/README.zh-CN.md b/src/submit-bar/README.zh-CN.md index b13eb130a..dbc0c7adb 100644 --- a/src/submit-bar/README.zh-CN.md +++ b/src/submit-bar/README.zh-CN.md @@ -70,6 +70,7 @@ Vue.use(SubmitBar); | text-align `v2.3.0` | 价格文案对齐方向,可选值为 `left` | _string_ | `right` | | button-text | 按钮文字 | _string_ | - | | button-type | 按钮类型 | _string_ | `danger` | +| button-color `v2.9.1` | 自定义按钮颜色 | _string_ | - | | tip | 提示文案 | _string_ | - | | tip-icon | 左侧[图标名称](#/zh-CN/icon)或图片链接 | _string_ | - | | currency | 货币符号 | _string_ | `¥` | diff --git a/src/submit-bar/index.tsx b/src/submit-bar/index.tsx index 06b6ffc5b..9e8092b4f 100644 --- a/src/submit-bar/index.tsx +++ b/src/submit-bar/index.tsx @@ -20,6 +20,7 @@ export type SubmitBarProps = { disabled?: boolean; buttonType: ButtonType; buttonText?: string; + buttonColor?: string; suffixLabel?: string; decimalLength: number; safeAreaInsetBottom?: boolean; @@ -87,6 +88,7 @@ function SubmitBar( round class={bem('button', props.buttonType)} type={props.buttonType} + color={props.buttonColor} loading={props.loading} disabled={props.disabled} text={props.loading ? '' : props.buttonText} @@ -108,6 +110,7 @@ SubmitBar.props = { disabled: Boolean, textAlign: String, buttonText: String, + buttonColor: String, suffixLabel: String, safeAreaInsetBottom: { type: Boolean, diff --git a/src/submit-bar/test/__snapshots__/index.spec.js.snap b/src/submit-bar/test/__snapshots__/index.spec.js.snap index 5241284d9..1f52d8d20 100644 --- a/src/submit-bar/test/__snapshots__/index.spec.js.snap +++ b/src/submit-bar/test/__snapshots__/index.spec.js.snap @@ -1,5 +1,13 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`button-color prop 1`] = ` +
+`; + exports[`decimal-length prop 1`] = `