Commit 1e9fd802 by chenwq1

fix:标签闭合

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