feat: handlePanelBlur

This commit is contained in:
KUN1007 2023-10-09 16:49:51 +08:00
parent c6786cfd00
commit eff2f60bd7
3 changed files with 19 additions and 3 deletions

View file

@ -160,7 +160,7 @@ const submitAnswer = () => {
<div v-if="isShowAnswer" class="answer">
<div>{{ $tm('AlertInfo.capture.hint4') }}</div>
<a
href="http://github.com/KUN1007/kun-galgame-vue"
href="https://github.com/KUN1007/kun-galgame-vue/tree/remove-server/src/components/capture"
target="_blank"
rel="noopener noreferrer"
>

View file

@ -97,7 +97,7 @@ onBeforeRouteLeave(() => {
</div>
<KUNGalgameUserInfo
v-if="showKUNGalgameUserPanel"
@blur="showKUNGalgameUserPanel = false"
@close="showKUNGalgameUserPanel = false"
/>
</div>
</div>

View file

@ -2,6 +2,22 @@
import { onMounted, ref } from 'vue'
const container = ref<HTMLElement>()
const emit = defineEmits({
close,
})
//
const handlePanelBlur = async () => {
//
await new Promise((resolve) => {
setTimeout(resolve, 107)
})
emit('close')
}
// 退
const logOut = () => {}
onMounted(() => {
//
container.value?.focus()
@ -9,7 +25,7 @@ onMounted(() => {
</script>
<template>
<div ref="container" tabindex="-1" class="container">
<div ref="container" tabindex="-1" class="container" @blur="handlePanelBlur">
<span class="triangle1"></span>
<span class="triangle2"></span>
<div class="kungalgamer">