fixed add to cart bugs
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
|
||||
<script setup>
|
||||
import init from '../../initialize/cart-total-invoice'
|
||||
|
||||
const { isMobile } = useDevice();
|
||||
const { breakpoint: device = isMobile ? "mobile" : "desktop" } = useViewport();
|
||||
const { dialog } = inject('service')
|
||||
|
||||
const data = inject('data')
|
||||
@@ -19,6 +20,10 @@ const data = inject('data')
|
||||
const items = computed(() => init(data.value))
|
||||
|
||||
const loading = ref(false)
|
||||
const position = computed(() => {
|
||||
if(device == "desktop") return "center"
|
||||
if(device == "mobile") return "bottom"
|
||||
})
|
||||
|
||||
const submitOrder = async () => {
|
||||
loading.value = true
|
||||
@@ -28,8 +33,8 @@ const submitOrder = async () => {
|
||||
loading.value = false
|
||||
|
||||
if (status.value == 'success') {
|
||||
dialog.open(resolveComponent('DialogPreFactorSubmit'), {
|
||||
props: { modal: true },
|
||||
dialog.open(resolveComponent('CartDialogPreFactor'), {
|
||||
props: { modal: true, position: 'bottom' },
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user