mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 03:38:41 +08:00
fix(docs): [vp-api-typing] (#10467)
* Add ClientOnly to wrap tooltip to prevent hydration issue. Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>
This commit is contained in:
parent
5221e3eb5d
commit
1ec01130d8
@ -12,22 +12,24 @@ defineProps({
|
||||
<code class="api-typing mr-1">
|
||||
{{ type }}
|
||||
</code>
|
||||
<el-tooltip v-if="details" effect="light" trigger="click">
|
||||
<el-button text :icon="Warning" class="p-2 text-4" />
|
||||
<template #content>
|
||||
<slot>
|
||||
<div class="m-1">
|
||||
<code
|
||||
style="
|
||||
color: var(--code-tooltip-color);
|
||||
background-color: var(--code-tooltip-bg-color);
|
||||
"
|
||||
>
|
||||
{{ details }}
|
||||
</code>
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
</el-tooltip>
|
||||
<ClientOnly>
|
||||
<ElTooltip v-if="details" effect="light" trigger="click">
|
||||
<ElButton text :icon="Warning" class="p-2 text-4" />
|
||||
<template #content>
|
||||
<slot>
|
||||
<div class="m-1">
|
||||
<code
|
||||
style="
|
||||
color: var(--code-tooltip-color);
|
||||
background-color: var(--code-tooltip-bg-color);
|
||||
"
|
||||
>
|
||||
{{ details }}
|
||||
</code>
|
||||
</div>
|
||||
</slot>
|
||||
</template>
|
||||
</ElTooltip>
|
||||
</ClientOnly>
|
||||
</span>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user