feat: 调整了查看全部按钮的位置

This commit is contained in:
ZiuChen 2022-08-25 22:24:15 +08:00
parent f707ac41f1
commit 2d4f7bce05
2 changed files with 24 additions and 21 deletions

View File

@ -11,30 +11,38 @@
>
<div class="clip-info">
<div class="clip-time">
<span>{{ dateFormat(item.updateTime) }}</span>
</div>
<div class="clip-data">
<template v-if="item.type === 'text'">
<div
<span
class="clip-data-status"
v-if="item.data.split(`\n`).length - 1 > 8"
@click.stop="handleDataClick(item)"
>
查看全部
</span>
<span v-else>{{ dateFormat(item.updateTime) }}</span>
</template>
<template v-if="item.type === 'image'">
<span>{{ dateFormat(item.updateTime) }}</span>
</template>
<template v-if="item.type === 'file'">
<span
class="clip-data-status"
v-if="JSON.parse(item.data).length >= 8"
@click.stop="handleDataClick(item)"
>
查看全部
</span>
<span v-else>{{ dateFormat(item.updateTime) }}</span>
</template>
</div>
<div class="clip-data">
<template v-if="item.type === 'text'">
<div>{{ item.data.split(`\n`).slice(0, 8).join(`\n`).trim() }}</div>
</template>
<template v-if="item.type === 'image'">
<img class="clip-data-image" :src="item.data" alt="Image" />
</template>
<template v-if="item.type === 'file'">
<div
class="clip-data-status"
v-if="JSON.parse(item.data).length >= 8"
@click.stop="handleDataClick(item)"
>
查看全部
</div>
<FileList :data="JSON.parse(item.data)" />
</template>
</div>

View File

@ -24,6 +24,7 @@
padding: 10px;
.clip-time {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-width: 100px;
@ -37,6 +38,9 @@
border-radius: 5px;
min-width: 50px;
padding: 5px 7px 5px 7px;
&.clip-data-status {
color: @primary-color;
}
}
}
.clip-data {
@ -54,15 +58,6 @@
max-width: 90%;
box-shadow: 0px 0px 3px @text-color;
}
.clip-data-status {
position: absolute;
width: fit-content;
color: @text-color;
background-color: @primary-color-lighter;
border-radius: 5px;
padding: 5px;
font-size: 13px;
}
}
}
.clip-count {