Commit aaa332ca11

aaa332ca113957ec7ca4909351b086b2cca7a197

parent: b03793d79a

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-05-12 15:08 UTC

Update Tooltip.vue

Layout: unified · split

docs/.vitepress/theme/components/Tooltip.vue +2 −12
@@ -13,12 +13,9 @@ const isOpen = ref(false)
13withDefaults( 13withDefaults(
14 defineProps<{ 14 defineProps<{
15 title: string 15 title: string
16 icon: string
17 }>(), 16 }>(),
18 { 17 {
19 title: 'Info', 18 title: 'Info',
20 // https://icon-sets.iconify.design/material-symbols/
21 icon: 'i-material-symbols-help'
22 } 19 }
23) 20)
24</script> 21</script>
@@ -27,12 +24,9 @@ withDefaults(
27 <VTooltip theme="vp-tooltip" @show="isOpen = true" @hide="isOpen = false"> 24 <VTooltip theme="vp-tooltip" @show="isOpen = true" @hide="isOpen = false">
28 <button 25 <button
29 aria-label="Tooltip" 26 aria-label="Tooltip"
30 :class="[ 27 class="size-3 p-0 select-none font-bold cursor-pointer" style="color: #a8f0cc"
31 'text-$vp-custom-block-tip-text-deep size-3 p-0 select-none font-bold cursor-pointer',
32 isOpen && 'tooltip-open-glow'
33 ]"
34 > 28 >
35 <div :class="icon" /> 29 <div :class="isOpen ? 'i-ic-twotone-add-circle' : 'i-ic-twotone-add-circle-outline'" />
36 </button> 30 </button>
37 31
38 <template #popper> 32 <template #popper>
@@ -90,8 +84,4 @@ withDefaults(
90 border-bottom: 1px solid var(--vp-c-divider); 84 border-bottom: 1px solid var(--vp-c-divider);
91} 85}
92 86
93.tooltip-open-glow {
94 filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor);
95 transition: filter 0.2s ease;
96}
97</style>\ No newline at end of file 87</style>\ No newline at end of file