Commit 1e9fd802 by chenwq1

fix:标签闭合

1 parent abae8c5f
Pipeline #172 for 1e9fd802 failed in 0 seconds
......@@ -332,93 +332,83 @@ onUnmounted(() => {
<span class="category-count"> · 共{{ cat.totalCount }}项</span>
</div>
<div v-for="(cat, catIdx) in displayCategories"
:key="cat.name"
:ref="(el) => setSectionRef(catIdx, el)"
class="category-section">
<div class="category-header">
<span class="category-name">{{ cat.name }}</span>
<span class="category-count"> · 共{{ cat.totalCount }}项</span>
</div>
<template v-if="cat.groups.length > 0">
<div v-for="group in cat.groups"
:key="group.type"
class="group-card">
<div class="group-header" @click="toggleCollapse(catIdx, group.type)">
<div class="group-header__left">
<img alt=""
class="group-type-icon"
:src="group.type === 'abnormal' ? CDN.fail : CDN.success" />
<span class="group-header__text">
{{ group.label }} · {{ group.items.length }}
</span>
</div>
<div class="group-header__right">
<span>
{{
isExpanded(catIdx, group.type) ? "收起" : "展开"
}}
</span>
<van-icon color="#969799"
:name="
isExpanded(catIdx, group.type) ? 'arrow-up' : 'arrow-down'
"
size="10" />
</div>
</div>
<template v-if="cat.groups.length > 0">
<div v-for="group in cat.groups"
:key="group.type"
class="group-card">
<div class="group-header" @click="toggleCollapse(catIdx, group.type)">
<div class="group-header__left">
<img alt=""
class="group-type-icon"
:src="group.type === 'abnormal' ? CDN.fail : CDN.success" />
<span class="group-header__text">
{{ group.label }} · {{ group.items.length }}
</span>
<div v-show="isExpanded(catIdx, group.type)" class="group-body">
<div v-for="(item, idx) in group.items"
:key="idx"
class="inspect-item">
<div class="item-name">
{{ item.name }}
</div>
<div class="group-header__right">
<span>
{{
isExpanded(catIdx, group.type) ? "收起" : "展开"
}}
</span>
<van-icon color="#969799"
:name="
isExpanded(catIdx, group.type) ? 'arrow-up' : 'arrow-down'
"
size="10" />
<div v-if="item.descriptions.length > 0" class="item-desc">
{{ item.descriptions.join("、") }}
</div>
</div>
<div v-show="isExpanded(catIdx, group.type)" class="group-body">
<div v-for="(item, idx) in group.items"
:key="idx"
class="inspect-item">
<div class="item-name">
{{ item.name }}
</div>
<div v-if="item.descriptions.length > 0" class="item-desc">
{{ item.descriptions.join("、") }}
</div>
<div v-if="item.images.length > 0" class="image-row">
<!-- 超过5张只渲染前5张,第5张叠加 +N 遮罩,N=隐藏数量 -->
<div v-for="(img, imgIdx) in item.images.slice(0, MAX_VISIBLE)"
:key="imgIdx"
class="image-thumb"
@click="onPreview(item.images, imgIdx)">
<van-image fit="cover"
height="56"
radius="4"
:src="img"
width="56" />
<div v-if="
item.images.length > MAX_VISIBLE &&
imgIdx === MAX_VISIBLE - 1
"
class="image-more-mask"
@click.stop="onPreview(item.images, MAX_VISIBLE)">
+{{ item.images.length - MAX_VISIBLE }}
</div>
<div v-if="item.images.length > 0" class="image-row">
<!-- 超过5张只渲染前5张,第5张叠加 +N 遮罩,N=隐藏数量 -->
<div v-for="(img, imgIdx) in item.images.slice(0, MAX_VISIBLE)"
:key="imgIdx"
class="image-thumb"
@click="onPreview(item.images, imgIdx)">
<van-image fit="cover"
height="56"
radius="4"
:src="img"
width="56" />
<div v-if="
item.images.length > MAX_VISIBLE &&
imgIdx === MAX_VISIBLE - 1
"
class="image-more-mask"
@click.stop="onPreview(item.images, MAX_VISIBLE)">
+{{ item.images.length - MAX_VISIBLE }}
</div>
</div>
<!-- 视频回显 -->
<div v-if="item.videos.length > 0" class="video-row">
<div v-for="(videoUrl, vIdx) in item.videos"
:key="vIdx"
class="video-thumb">
<video class="video-player"
controls
playsinline
preload="metadata"
:src="videoUrl" />
</div>
</div>
<!-- 视频回显 -->
<div v-if="item.videos.length > 0" class="video-row">
<div v-for="(videoUrl, vIdx) in item.videos"
:key="vIdx"
class="video-thumb">
<video class="video-player"
controls
playsinline
preload="metadata"
:src="videoUrl" />
</div>
</div>
</div>
</div>
</template>
<div v-else class="empty-tip">
暂无异常项
</div>
</template>
<div v-else class="empty-tip">
暂无异常项
</div>
</div>
</div>
......@@ -429,7 +419,6 @@ onUnmounted(() => {
:start-position="previewIndex"
teleport="#vant-portal-host" />
</div>
</div>
</template>
<style lang="scss" scoped>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!