diff --git a/packages/common/style/var.less b/packages/common/style/var.less index 5d3b65b2..51b85a36 100644 --- a/packages/common/style/var.less +++ b/packages/common/style/var.less @@ -258,7 +258,11 @@ // GoodsAction @goods-action-background-color: @white; -@goods-action-icon-height: 50px; +@goods-action-height: 50px; +@goods-action-icon-width: 48px; +@goods-action-icon-height: @goods-action-height; +@goods-action-icon-color: @text-color; +@goods-action-icon-size: 18px; @goods-action-icon-font-size: @font-size-xs; @goods-action-icon-text-color: @gray-7; @goods-action-button-height: 40px; diff --git a/packages/goods-action-icon/index.less b/packages/goods-action-icon/index.less index edfa844e..f757e20a 100644 --- a/packages/goods-action-icon/index.less +++ b/packages/goods-action-icon/index.less @@ -2,20 +2,21 @@ @import '../common/style/theme.less'; .van-goods-action-icon { + display: flex !important; + flex-direction: column; + justify-content: center !important; + line-height: 1 !important; border: none !important; - .theme(width, '@goods-action-icon-height') !important; - &__content { - display: flex; - flex-direction: column; - justify-content: center; - height: 100%; - line-height: 1; - .theme(font-size, '@goods-action-icon-font-size'); - .theme(color, '@goods-action-icon-text-color'); - } + .theme(font-size, '@goods-action-icon-font-size') !important; + .theme(color, '@goods-action-icon-text-color') !important; + .theme(min-width, '@goods-action-icon-width'); + .theme(height, '@goods-action-icon-height') !important; &__icon { - margin-bottom: 4px; + display: flex; + margin: 0 auto 5px; + .theme(color, '@goods-action-icon-color'); + .theme(font-size, '@goods-action-icon-size'); } } diff --git a/packages/goods-action-icon/index.wxml b/packages/goods-action-icon/index.wxml index f3f00522..1983cae4 100644 --- a/packages/goods-action-icon/index.wxml +++ b/packages/goods-action-icon/index.wxml @@ -22,17 +22,14 @@ bindgetphonenumber="bindGetPhoneNumber" bindlaunchapp="bindLaunchApp" > - - - - {{ text }} - + + + {{ text }} diff --git a/packages/goods-action/index.less b/packages/goods-action/index.less index a0f33438..020f0fac 100644 --- a/packages/goods-action/index.less +++ b/packages/goods-action/index.less @@ -8,6 +8,7 @@ left: 0; display: flex; align-items: center; + .theme(height, '@goods-action-height'); .theme(background-color, '@goods-action-background-color'); &--safe {