no message

This commit is contained in:
A1300399510
2024-01-03 17:08:29 +08:00
parent 4665ee5043
commit b2e7cb8f45
79 changed files with 915 additions and 799 deletions

View File

@@ -30,7 +30,7 @@
<img class="data-item-icon" src="@/assets/img/eye-icon.svg" />
{{ item["views"] || 0 }}
</div>
<div class="data-item flexacenter" @click.prevent="handleLike(item['uniqid'], item['token'])">
<div class="data-item flexacenter" @click.prevent="handleLike(item['uniqid'], item['token'], item['islike'])">
<img class="data-item-icon" v-if="item['islike'] == 0" src="@/assets/img/like-no.svg" />
<img class="data-item-icon" v-else src="@/assets/img/like-yes.png" />
{{ item["likenum"] || 0 }}
@@ -47,11 +47,17 @@
let props = defineProps({
item: Object,
})
import { ElMessage } from "element-plus"
const emit = defineEmits(["childEvent"])
// 处理点赞
const handleLike = (uniqid, token) => {
const handleLike = (uniqid, token, islike) => {
if (islike == 1) {
ElMessage.error("不可取消点赞")
return
}
emit("handleLike", token)
}
</script>
@@ -65,6 +71,30 @@ const handleLike = (uniqid, token) => {
cursor: pointer;
margin-bottom: 20px;
&:hover {
.content {
.text-box {
background: rgba(114, 219, 134, 1);
.text {
color: #fff;
}
.time {
color: #fff;
.time-icon {
&.time-black-icon {
display: none;
}
&.time-white-icon {
display: block;
}
}
}
}
}
}
.img {
width: 26px;
height: 26px;
@@ -113,25 +143,25 @@ const handleLike = (uniqid, token) => {
margin-bottom: 11px;
transition: all 0.3s;
&:hover {
background: rgba(114, 219, 134, 1);
.text {
color: #fff;
}
// &:hover {
// background: rgba(114, 219, 134, 1);
// .text {
// color: #fff;
// }
.time {
color: #fff;
.time-icon {
&.time-black-icon {
display: none;
}
// .time {
// color: #fff;
// .time-icon {
// &.time-black-icon {
// display: none;
// }
&.time-white-icon {
display: block;
}
}
}
}
// &.time-white-icon {
// display: block;
// }
// }
// }
// }
.text {
line-height: 24px;