fix. sns 버튼 동작 수정

This commit is contained in:
clkim
2025-11-05 15:05:09 +09:00
parent 49442f7760
commit 6b1b9885a0
3 changed files with 22 additions and 25 deletions

View File

@@ -20,23 +20,11 @@ const snsList = computed(() => {
})
const handleMouseEnter = () => {
if (isForceClosed.value) return
showSnsList.value = true
}
const handleMouseLeave = () => {
if (isForceClosed.value) return
showSnsList.value = false
}
const handleForceClose = () => {
isForceClosed.value = true
showSnsList.value = false
// 일정 시간 뒤 다시 hover 가능하도록 초기화
setTimeout(() => {
isForceClosed.value = false
}, 500)
}
const handleCopy = async () => {
@@ -53,14 +41,12 @@ const handleCopy = async () => {
</script>
<template>
<div
v-if="Object.keys(snsList).length > 0"
class="sns-container"
@mouseenter="handleMouseEnter"
@mouseleave="handleMouseLeave"
@click="handleMouseEnter"
>
<button class="btn-sns" :style="{ backgroundColor: snsBackgroundColor }">
<div v-if="Object.keys(snsList).length > 0" class="sns-container">
<button
class="btn-sns"
:style="{ backgroundColor: snsBackgroundColor }"
@click="handleMouseEnter"
>
<AtomsIconsShareLine class="icon-share" />
<span class="sr-only">sns</span>
</button>