29 lines
1.1 KiB
Vue
29 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|||
|
|
import { computed } from 'vue'
|
||
|
|
import { getTradeBuyPrice, getTradeSellPrice, price } from '@/utils/price'
|
||
|
|
import { usePriceWithoutType } from '@/utils/usePrice'
|
||
|
|
|
||
|
|
const highPrice = computed(() => price.value?.up?.buy ?? getTradeBuyPrice(price.value))
|
||
|
|
const lowPrice = computed(() => price.value?.up?.sell ?? getTradeSellPrice(price.value))
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<div class="dhome-surface dhome-price-range">
|
||
|
|
<div class="dhome-price-range__item">
|
||
|
|
<span class="dhome-label">بیشترین امروز</span>
|
||
|
|
<span class="dhome-price-range__value dhome-price-range__value--high">
|
||
|
|
{{ usePriceWithoutType(highPrice) }}
|
||
|
|
<span class="text-xs font-medium text-gray-400 mr-1">ریال</span>
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
<div class="dhome-price-range__divider" />
|
||
|
|
<div class="dhome-price-range__item">
|
||
|
|
<span class="dhome-label">کمترین امروز</span>
|
||
|
|
<span class="dhome-price-range__value dhome-price-range__value--low">
|
||
|
|
{{ usePriceWithoutType(lowPrice) }}
|
||
|
|
<span class="text-xs font-medium text-gray-400 mr-1">ریال</span>
|
||
|
|
</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</template>
|