Commit 9c2bc70678
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/Tooltip.vue +24 −7
| @@ -24,11 +24,7 @@ withDefaults( | |||
| 24 | </script> | 24 | </script> |
| 25 | 25 | ||
| 26 | <template> | 26 | <template> |
| 27 | <VTooltip | 27 | <VTooltip theme="vp-tooltip" @show="isOpen = true" @hide="isOpen = false"> |
| 28 | theme="vp-tooltip" | ||
| 29 | @show="isOpen = true" | ||
| 30 | @hide="isOpen = false" | ||
| 31 | > | ||
| 32 | <button | 28 | <button |
| 33 | aria-label="Tooltip" | 29 | aria-label="Tooltip" |
| 34 | :class="[ | 30 | :class="[ |
| @@ -45,9 +41,9 @@ withDefaults( | |||
| 45 | class="text-$vp-c-text-1 mb-2 text-lg font-semibold" | 41 | class="text-$vp-c-text-1 mb-2 text-lg font-semibold" |
| 46 | v-text="title" | 42 | v-text="title" |
| 47 | /> | 43 | /> |
| 48 | <p class="text-$vp-c-text-2 text-sm content"> | 44 | <div class="text-$vp-c-text-2 text-sm content"> |
| 49 | <slot /> | 45 | <slot /> |
| 50 | </p> | 46 | </div> |
| 51 | </div> | 47 | </div> |
| 52 | </template> | 48 | </template> |
| 53 | </VTooltip> | 49 | </VTooltip> |
| @@ -72,6 +68,27 @@ withDefaults( | |||
| 72 | list-style: disc !important; | 68 | list-style: disc !important; |
| 73 | } | 69 | } |
| 74 | 70 | ||
| 71 | .v-popper__popper .content table { | ||
| 72 | width: 100%; | ||
| 73 | border-collapse: collapse; | ||
| 74 | background-color: var(--vp-c-bg-soft); | ||
| 75 | color: var(--vp-c-text-1); | ||
| 76 | --uno: text-sm; | ||
| 77 | } | ||
| 78 | |||
| 79 | .v-popper__popper .content thead th { | ||
| 80 | background-color: var(--vp-c-bg-soft); | ||
| 81 | color: var(--vp-c-text-1); | ||
| 82 | font-weight: 600; | ||
| 83 | padding: 6px 8px; | ||
| 84 | border-bottom: 1px solid var(--vp-c-divider); | ||
| 85 | } | ||
| 86 | |||
| 87 | .v-popper__popper .content tbody td { | ||
| 88 | padding: 6px 8px; | ||
| 89 | border-bottom: 1px solid var(--vp-c-divider); | ||
| 90 | } | ||
| 91 | |||
| 75 | .tooltip-open-glow { | 92 | .tooltip-open-glow { |
| 76 | filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor); | 93 | filter: drop-shadow(0 0 6px currentColor) drop-shadow(0 0 12px currentColor); |
| 77 | transition: filter 0.2s ease; | 94 | transition: filter 0.2s ease; |