feat: add currency symbol
This commit is contained in:
parent
e25a5d3bfb
commit
2767047ada
@ -28,7 +28,7 @@
|
||||
<div class="flex justify-between mt-5">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-slate-400 uppercase">Цена:</span>
|
||||
<b>{{decimalFormatter.format(price)}} руб.</b>
|
||||
<b>{{decimalFormatter.format(price)}} </b>
|
||||
</div>
|
||||
|
||||
<img @click="onClickAdd" :src="isAdded ? '/checked.svg' : '/plus.svg'" alt="Add">
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
<p>{{item.title}}</p>
|
||||
|
||||
<div class="flex justify-between mt-2">
|
||||
<b>{{ decimalFormatter.format(item.price) }} руб.</b>
|
||||
<b>{{ decimalFormatter.format(item.price) }}</b>
|
||||
<img @click="() => $emit('onRemove', item)" src="/close.svg" alt="Close" class="cursor-pointer transition opacity-40 hover:opacity-100">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -42,19 +42,19 @@
|
||||
<div class="flex justify-between gap-2">
|
||||
<span>Итого:</span>
|
||||
<div class="flex-1 border-b border-dashed"></div>
|
||||
<b>{{ decimalFormatter.format(totalPrice) }} руб.</b>
|
||||
<b>{{ decimalFormatter.format(totalPrice) }} </b>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-2">
|
||||
<span>Налог 5%:</span>
|
||||
<div class="flex-1 border-b border-dashed"></div>
|
||||
<b>{{ decimalFormatter.format(totalPrice * 0.05) }} руб.</b>
|
||||
<b>{{ decimalFormatter.format(totalPrice * 0.05) }} </b>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between gap-2">
|
||||
<span>К оплате:</span>
|
||||
<div class="flex-1 border-b border-dashed"></div>
|
||||
<b>{{ decimalFormatter.format(totalPrice * 0.95) }} руб.</b>
|
||||
<b>{{ decimalFormatter.format(totalPrice * 0.95) }} </b>
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
class="flex items-center gap-2 text-gray-500 hover:text-black cursor-pointer"
|
||||
>
|
||||
<img src="/cart.svg" alt="Cart" />
|
||||
<b> {{ decimalFormatter.format(totalPrice)}} руб. </b>
|
||||
<b> {{ decimalFormatter.format(totalPrice)}} </b>
|
||||
</li>
|
||||
|
||||
<li class="flex items-center gap-2 text-gray-500 hover:text-black cursor-pointer">
|
||||
|
||||
@ -1 +1 @@
|
||||
export const decimalFormatter = new Intl.NumberFormat('ru-RU', { style: 'decimal' });
|
||||
export const decimalFormatter = new Intl.NumberFormat('ru-RU', { style: 'currency', currency: 'RUB' });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user