diff --git a/packages/common/style/var.less b/packages/common/style/var.less
index 8a2b3e26..e7b5c5f7 100644
--- a/packages/common/style/var.less
+++ b/packages/common/style/var.less
@@ -415,8 +415,8 @@
@submit-bar-background-color: @white;
@submit-bar-button-width: 110px;
@submit-bar-price-color: @red;
-@submit-bar-price-font-size: 18px;
-@submit-bar-currency-font-size: 14px;
+@submit-bar-price-font-size: @font-size-sm;
+@submit-bar-currency-font-size: @font-size-sm;
@submit-bar-text-color: @text-color;
@submit-bar-text-font-size: 14px;
@submit-bar-tip-padding: 10px;
@@ -425,6 +425,10 @@
@submit-bar-tip-color: #f56723;
@submit-bar-tip-background-color: #fff7cc;
@submit-bar-tip-icon-size: 12px;
+@submit-bar-button-height: 40px;
+@submit-bar-padding: 0 @padding-md;
+@submit-bar-price-integer-font-size: 20px;
+@submit-bar-price-font-family: @price-integer-font-family;
// Tabbar
@tabbar-height: 50px;
diff --git a/packages/submit-bar/index.less b/packages/submit-bar/index.less
index 0f39780c..44584a1f 100644
--- a/packages/submit-bar/index.less
+++ b/packages/submit-bar/index.less
@@ -40,6 +40,7 @@
display: flex;
align-items: center;
justify-content: flex-end;
+ .theme(padding, '@submit-bar-padding');
.theme(height, '@submit-bar-height');
.theme(font-size, '@submit-bar-text-font-size');
.theme(background-color, '@submit-bar-background-color');
@@ -60,7 +61,13 @@
&__price {
.theme(color, '@submit-bar-price-color');
+ .theme(font-weight, '@font-weight-bold');
.theme(font-size, '@submit-bar-price-font-size');
+
+ &-integer {
+ font-size: @submit-bar-price-integer-font-size;
+ font-family: @submit-bar-price-font-family;
+ }
}
&__currency {
@@ -72,6 +79,9 @@
}
&__button {
- .theme(width, '@submit-bar-button-width');
+ .theme(width,'@submit-bar-button-width');
+ .theme(font-weight, '@font-weight-bold');
+ .theme(--button-default-height, '@submit-bar-button-height') !important;
+ .theme(--button-line-height, '@submit-bar-button-height') !important;
}
}
diff --git a/packages/submit-bar/index.ts b/packages/submit-bar/index.ts
index 307d470b..8584c85c 100644
--- a/packages/submit-bar/index.ts
+++ b/packages/submit-bar/index.ts
@@ -46,9 +46,11 @@ VantComponent({
methods: {
updatePrice() {
const { price, decimalLength } = this.data;
+ const priceStrArr = typeof price === 'number' && (price / 100).toFixed(decimalLength).split('.');
this.setData({
hasPrice: typeof price === 'number',
- priceStr: (price / 100).toFixed(decimalLength)
+ integerStr: priceStrArr && priceStrArr[0],
+ decimalStr: decimalLength && priceStrArr ? `.${priceStrArr[1]}` : ''
});
},
diff --git a/packages/submit-bar/index.wxml b/packages/submit-bar/index.wxml
index 4cdbd18d..7a623f70 100644
--- a/packages/submit-bar/index.wxml
+++ b/packages/submit-bar/index.wxml
@@ -22,18 +22,18 @@
{{ label || '合计:' }}
{{ currency }}
- {{ priceStr }}
+ {{ integerStr }}{{decimalStr}}
{{ suffixLabel }}
{{ loading ? '' : buttonText }}