48 lines
1.2 KiB
Vue
48 lines
1.2 KiB
Vue
<template>
|
|||
|
|
<BasicModal
|
||
|
|
v-model:visible="visible"
|
||
|
|
width="460px"
|
||
|
|
destroy-on-close
|
||
|
|
custom-footer
|
||
|
|
title="تبدیل محصول"
|
||
|
|
wrap-class-name="app-premium-modal--scroll-tall"
|
||
|
|
@close="closeCopperConvert"
|
||
|
|
>
|
||
|
|
<CopperConvertCalculator />
|
||
|
|
|
||
|
|
<template #footer>
|
||
|
|
<BasicButton
|
||
|
|
type="primary"
|
||
|
|
class="app-premium-modal__btn-primary !w-full"
|
||
|
|
size="middle"
|
||
|
|
@click="closeCopperConvert"
|
||
|
|
>
|
||
|
|
بستن
|
||
|
|
</BasicButton>
|
||
|
|
</template>
|
||
|
|
</BasicModal>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup lang="ts">
|
||
|
|
import { watch } from 'vue'
|
||
|
|
import BasicModal from '@/components/BasicPacks/BasicModal.vue'
|
||
|
|
import BasicButton from '@/components/BasicPacks/BasicButton.vue'
|
||
|
|
import CopperConvertCalculator from '@/views/base/convert/components/CopperConvertCalculator.vue'
|
||
|
|
import {
|
||
|
|
closeCopperConvert,
|
||
|
|
copperConvertModalVisible,
|
||
|
|
} from '@/composables/useCopperConvertModal'
|
||
|
|
import { useCopperConvertPage } from '@/views/base/convert/composables/useCopperConvertPage'
|
||
|
|
|
||
|
|
const visible = copperConvertModalVisible
|
||
|
|
const { refreshLivePrices, stopLivePrices } = useCopperConvertPage()
|
||
|
|
|
||
|
|
watch(visible, async (open) => {
|
||
|
|
if (open) {
|
||
|
|
await refreshLivePrices()
|
||
|
|
} else {
|
||
|
|
stopLivePrices()
|
||
|
|
}
|
||
|
|
})
|
||
|
|
</script>
|