|
|
|
@ -1,11 +1,11 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<view :style="{'--color': color}"> |
|
|
|
<block v-if="isPoint"> |
|
|
|
<text class="text-price lf-font-48 lf-font-bold lf-color-price">{{ showPrice(1) }}</text> |
|
|
|
<text class="lf-font-28 lf-font-bold lf-color-price">.{{ showPrice(2) }}</text> |
|
|
|
<text class="price-one text-price">{{ showPrice(1) }}</text> |
|
|
|
<text class="price-two">.{{ showPrice(2) }}</text> |
|
|
|
</block> |
|
|
|
<block v-else> |
|
|
|
<text class="text-price lf-font-48 lf-font-bold lf-color-price">{{ showPrice() }}</text> |
|
|
|
<text class="price-one text-price">{{ showPrice() }}</text> |
|
|
|
</block> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -16,6 +16,10 @@ |
|
|
|
price: { |
|
|
|
type: [Number, String], |
|
|
|
default: '' |
|
|
|
}, |
|
|
|
color: { |
|
|
|
type: String, |
|
|
|
default: '#FF0000' |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -42,5 +46,21 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped="scoped"> |
|
|
|
|
|
|
|
.price-one{ |
|
|
|
font-size: 48rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: var(--color); |
|
|
|
} |
|
|
|
.price-two{ |
|
|
|
font-size: 28rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: var(--color); |
|
|
|
} |
|
|
|
.text-price::before { |
|
|
|
content: "¥"; |
|
|
|
font-size: 28rpx!important; |
|
|
|
margin-right: 4rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: var(--color); |
|
|
|
} |
|
|
|
</style> |