50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
<script setup lang="ts">
|
|
const props = defineProps({
|
|
date: String,
|
|
text: String,
|
|
top:String,
|
|
labelText: String,
|
|
labelColor: String,
|
|
size:String,
|
|
isRead:Number
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="date-wrapper" :data-date="date">
|
|
|
|
<img v-if="labelText ==='New'" src="../assets/images/NEW3.gif" :class="size||[]"/>
|
|
<img v-if="labelText ==='紧急'" src="../assets/images/jj.gif" :class="size||[]"/>
|
|
<span :style="isRead===2?'color:#0058E5;font-weight:800':''">{{ text }}</span>
|
|
<!-- <span class="invisible">{{ date }}</span> -->
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="less">
|
|
.date-wrapper {
|
|
line-height: 1.5;
|
|
position: relative;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
|
|
// truncate
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
// white-space: nowrap;
|
|
vertical-align: middle;
|
|
|
|
color: #142142;
|
|
|
|
&::after {
|
|
content: attr(data-date);
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 0;
|
|
color: #808696;
|
|
background-color: #fff;
|
|
padding-left: 20px;
|
|
}
|
|
}
|
|
</style>
|