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:
Jeremy 2022-11-06 14:46:35 +08:00 committed by GitHub
parent 5221e3eb5d
commit 1ec01130d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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>