fix(theme): broken card a11y, close #841 (#848)

This commit is contained in:
pengzhanbo 2026-02-12 01:00:52 +08:00 committed by GitHub
parent 98a969c112
commit 5a73b59297
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,14 +21,14 @@ const iconName = computed<string | { svg: string }>(() => {
<template>
<article class="vp-card-wrapper">
<slot name="title">
<p v-if="title || icon" class="title">
<header v-if="title || icon" class="title">
<VPIcon v-if="icon" :name="iconName" />
<span v-if="title" class="text" v-html="title" />
</p>
</header>
</slot>
<div class="body">
<section class="body">
<slot />
</div>
</section>
</article>
</template>
@ -68,6 +68,7 @@ const iconName = computed<string | { svg: string }>(() => {
.vp-card-wrapper .title .text {
flex: 1 2;
min-width: 0;
overflow: hidden;
}