diff --git a/app/components/liveMinWindow/index.vue b/app/components/liveMinWindow/index.vue index ee05842..7cbb252 100644 --- a/app/components/liveMinWindow/index.vue +++ b/app/components/liveMinWindow/index.vue @@ -51,7 +51,7 @@ const props = defineProps({ const router = useRouter() const dragRef = shallowRef(null) const route = useRoute() -console.log('route',route) + const isDragging = ref(false) const startX = ref(0) const startY = ref(0) @@ -143,6 +143,11 @@ const handleClose = (event) => { event?.stopPropagation() props.onClose() } +watch(() => route.path, (newVal) => { + if (['/','/home'].includes(newVal)){ + handleClose() + } +}) onBeforeUnmount(() => { document.removeEventListener('mousemove', handleDragMove) document.removeEventListener('mouseup', handleDragEnd) diff --git a/app/pages/liveRoom/components/PaymentInput/index.vue b/app/pages/liveRoom/components/PaymentInput/index.vue index 9754263..08f89d8 100644 --- a/app/pages/liveRoom/components/PaymentInput/index.vue +++ b/app/pages/liveRoom/components/PaymentInput/index.vue @@ -19,7 +19,6 @@ const changePayStatus=()=>{ payStatus.value=payStatus.value===0?1:0 } const close=()=>{ - console.log('close') emit('update:show',false) } const confirm=()=>{ diff --git a/app/pages/liveRoom/index.client.vue b/app/pages/liveRoom/index.client.vue index 5649ea5..9a0288d 100644 --- a/app/pages/liveRoom/index.client.vue +++ b/app/pages/liveRoom/index.client.vue @@ -117,7 +117,7 @@ const updateShow=()=>{ - +