Files
FiDA_Front/src/views/home/agent/components/ReportCard.vue

92 lines
2.0 KiB
Vue
Raw Normal View History

<template>
<div class="report-card" :class="{ 'is-url': isUrl, 'is-sketch': isSketch }">
<div class="report-card-header">
<!-- <span v-if="!isUrl && !isSketch">{{ title || '' }}</span> -->
2026-03-30 11:03:52 +08:00
<div class="web-sources flex">
<span>{{ title || '' }}</span>
2026-03-16 11:43:19 +08:00
<img src="@/assets/images/link.png" class="link-icon" />
</div>
</div>
<div class="report-card-content">
2026-03-24 13:59:16 +08:00
<span v-if="!isUrl && !isSketch">{{ content || 'markdown.md' }}</span>
<span v-else>{{ content || '' }}</span>
</div>
</div>
</template>
<script setup lang="ts">
2026-03-16 11:43:19 +08:00
const props = withDefaults(
defineProps<{
title?: string
content?: string
isUrl?: boolean
isSketch?: boolean
2026-03-16 11:43:19 +08:00
}>(),
{
isUrl: false,
title: '',
content: '',
isSketch: false
2026-03-16 11:43:19 +08:00
}
)
</script>
<style lang="less" scoped>
.report-card {
2026-03-13 17:23:56 +08:00
cursor: pointer;
2026-03-16 11:43:19 +08:00
width: 100%;
// height: 11.2rem;
2026-03-26 16:45:35 +08:00
margin: 1.2rem 0 0;
// min-height: 11.2rem;
background: url('@/assets/images/report-card.png') no-repeat;
background-size: 100% 100%;
// padding: 2.9rem;
overflow: hidden;
position: relative;
2026-03-26 16:45:35 +08:00
margin-bottom: 0;
padding: 2rem 3rem;
max-width: 52.5rem;
box-sizing: border-box;
height: 8rem;
2026-03-16 11:43:19 +08:00
&.is-url {
background: url('@/assets/images/link-card.png') no-repeat;
background-size: 100% 100%;
// margin: 2.4rem 0;
2026-03-16 11:43:19 +08:00
}
&.is-sketch {
background: url('@/assets/images/sketch-card.png') no-repeat;
2026-03-24 16:57:40 +08:00
background-size: 100% 100%;
.report-card-header {
margin-bottom: 0;
}
}
&-header {
font-family: 'Medium';
2026-03-26 16:45:35 +08:00
font-size: 1.2rem;
2026-04-09 15:22:30 +08:00
// margin-bottom: 1.3rem;
2026-03-16 11:43:19 +08:00
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
2026-03-30 11:03:52 +08:00
-webkit-line-clamp: 2;
2026-03-16 11:43:19 +08:00
-webkit-box-orient: vertical;
2026-03-30 11:03:52 +08:00
line-clamp: 2;
2026-03-16 11:43:19 +08:00
.web-sources {
column-gap: 0.8rem;
2026-03-30 11:03:52 +08:00
align-items: flex-start;
word-break: break-all;
2026-03-16 11:43:19 +08:00
.link-icon {
width: 1.6rem;
height: 1.6rem;
}
}
}
&-content {
font-family: 'Regular';
font-weight: 300;
2026-03-26 16:45:35 +08:00
font-size: 1.2rem;
2026-03-16 11:43:19 +08:00
color: #7c7c7c;
}
}
</style>