fix(theme): back-to-top hydration Mismatch (#257)

This commit is contained in:
pengzhanbo 2024-10-08 20:43:53 +08:00 committed by GitHub
parent b721bf08f9
commit 3fe7497df1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,10 +66,10 @@ function handleClick() {
aria-label="back to top"
@click="handleClick"
>
<span class="percent" :class="{ show: isScrolling }">{{ percent }}</span>
<span class="percent" :class="{ show: isScrolling }" data-allow-mismatch>{{ percent }}</span>
<span class="icon vpi-back-to-top" :class="{ show: !isScrolling }" />
<svg aria-hidden="true">
<circle cx="50%" cy="50%" :style="{ 'stroke-dasharray': stroke }" />
<circle cx="50%" cy="50%" data-allow-mismatch :style="{ 'stroke-dasharray': stroke }" />
</svg>
</button>
</Transition>