Product Conversion
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user