后期修改完善,上线版本
This commit is contained in:
@ -17,14 +17,14 @@ export default {
|
||||
getImageSrc() {
|
||||
// 如果已经点赞,显示选中的图片
|
||||
if (this.isActive) {
|
||||
return '/ToolDetail/icon_comment_selected.png';
|
||||
return require('/static/ToolDetail/icon_comment_selected.png');
|
||||
}
|
||||
// 如果鼠标悬停或点击,显示高亮的图片
|
||||
if (this.isHovered) {
|
||||
return '/ToolDetail/icon_comment_selected.png';
|
||||
return require('/static/ToolDetail/icon_comment_selected.png');
|
||||
}
|
||||
// 默认显示普通图片
|
||||
return '/ToolDetail/icon_comment.png';
|
||||
return require('/static/ToolDetail/icon_comment.png');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -62,7 +62,7 @@ export default {
|
||||
box-shadow: 0 4px 6px 0 #0000000d;
|
||||
background: #fff;
|
||||
padding: 5px;
|
||||
font-family: 'Poppins-Regular', serif;
|
||||
font-family: 'Poppins-Regular';
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
img {
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
{{item.username || ''}}
|
||||
</div>
|
||||
<div class="date-wrap flex-top-left">
|
||||
<img src="/ToolDetail/icon_clock1.png" alt="" style="width: 16px; height: 16px;" />
|
||||
<span style="line-height: 18px">{{ item.createdAt || '' }}</span>
|
||||
<img src="/ToolDetail/icon_clock1.png" alt="" />
|
||||
<span class="line-h-18">{{ item.createdAt || '' }}</span>
|
||||
</div>
|
||||
<p class="comment-text">
|
||||
{{ item.content || '' }}
|
||||
@ -38,6 +38,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.line-h-18 {
|
||||
line-height: 18px;
|
||||
}
|
||||
.comment-item-box {
|
||||
gap: 15px;
|
||||
padding: 30px 0;
|
||||
@ -54,22 +57,26 @@ export default {
|
||||
.comment-author {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
font-family: 'Poppins-SemiBold', serif;
|
||||
font-family: 'Poppins-SemiBold';
|
||||
color: #1E293B;
|
||||
line-height: 27px;
|
||||
height: 27px;
|
||||
}
|
||||
.date-wrap {
|
||||
gap: 8px;
|
||||
font-family: 'Poppins-Regular', serif;
|
||||
font-family: 'Poppins-Regular';
|
||||
font-size: 14px;
|
||||
color: #869EC2;
|
||||
margin-top: 3px;
|
||||
img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
.comment-text {
|
||||
margin-bottom: 0;
|
||||
margin-top: 13px;
|
||||
font-family: 'Poppins-Regular', serif;
|
||||
font-family: 'Poppins-Regular';
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,8 +15,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
goToToolDetail() {
|
||||
if (this.config.slug && this.category_slug) {
|
||||
this.$router.push('/detail?tool_slug=' + this.config.slug + '&category_slug=' + this.category_slug);
|
||||
if (this.config.slug && this.config.categoryName && this.category_slug) {
|
||||
this.$router.push('/detail?tool_slug=' + this.config.slug + '&category_slug=' + this.category_slug + '&category_name=' + this.config.categoryName);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -37,12 +37,12 @@ export default {
|
||||
<div class="icon">
|
||||
<img :src="config.iconUrl || '/'" alt="" />
|
||||
</div>
|
||||
<span style="font-size: 18px">
|
||||
{{ config.name || '' }}
|
||||
</span>
|
||||
<span class="title-text">
|
||||
{{ config.name || '' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
{{ config.memo || '' }}
|
||||
{{ config.memo ? config.memo : '' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -50,12 +50,12 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
.similar-card-container {
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 10px 30px 0 #0000000d;
|
||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.05);
|
||||
border-radius: 8px;
|
||||
padding: 16px 16px 10px;
|
||||
border: 1px solid #BACFFF;
|
||||
max-width: 305px;
|
||||
cursor: pointer;
|
||||
padding: 16px;
|
||||
border: 1px solid #E2E8F0;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
&:hover {
|
||||
@include gradient-border($linear-gradient-start, $linear-gradient-end);
|
||||
@ -68,6 +68,14 @@ export default {
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
|
||||
.title-text {
|
||||
font-size: 18px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 40px;
|
||||
@ -86,20 +94,23 @@ export default {
|
||||
color: $main-font-color;
|
||||
font-size: $big-font-size;
|
||||
font-weight: 600;
|
||||
font-family: 'Poppins-SemiBold', serif;
|
||||
white-space: nowrap;
|
||||
font-family: 'Poppins-SemiBold';
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
color: $grey-color;
|
||||
font-family: 'Poppins-Regular', serif;
|
||||
font-family: 'Poppins-Regular';
|
||||
margin-top: 4px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -26,14 +26,14 @@ export default {
|
||||
getImageSrc() {
|
||||
// 如果已经点赞,显示选中的图片
|
||||
if (this.isActive) {
|
||||
return '/ToolDetail/icon_thumb_selected.png';
|
||||
return require('/static/ToolDetail/icon_thumb_selected.png');
|
||||
}
|
||||
// 如果鼠标悬停或点击,显示高亮的图片
|
||||
if (this.isHovered) {
|
||||
return '/ToolDetail/icon_thumb_selected.png';
|
||||
return require('/static/ToolDetail/icon_thumb_selected.png');
|
||||
}
|
||||
// 默认显示普通图片
|
||||
return '/ToolDetail/icon_thumb.png';
|
||||
return require('/static/ToolDetail/icon_thumb.png');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -107,7 +107,7 @@ export default {
|
||||
box-shadow: 0 4px 6px 0 #0000000d;
|
||||
background: #fff;
|
||||
padding: 5px;
|
||||
font-family: 'Poppins-Regular', serif;
|
||||
font-family: 'Poppins-Regular';
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
img {
|
||||
|
||||
Reference in New Issue
Block a user