From 9b0c3f94161e9f01161baec9ea49025873ee54a4 Mon Sep 17 00:00:00 2001 From: A1300399510 Date: Thu, 13 Feb 2025 19:05:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=AE=A8=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.vue | 2 +- assets/css/DetailsComments.css | 75 ++++++-- assets/css/DetailsComments.less | 84 ++++++-- components/DetailsArea.vue | 18 +- components/DetailsComments.vue | 332 ++++++++++++++++++++++++++++++-- composables/api.js | 10 + utils/http.js | 2 +- 7 files changed, 466 insertions(+), 57 deletions(-) diff --git a/app.vue b/app.vue index 150c4f7..503947a 100644 --- a/app.vue +++ b/app.vue @@ -85,7 +85,7 @@ provide("isGetLoginState", isGetLoginState) margin: 0; padding: 0; box-sizing: border-box; - font-family: "PingFangSC-Regular", "PingFang SC", sans-serif; + font-family: "PingFangSC-Regular", "PingFang SC", sans-serif !important; } .flexflex { diff --git a/assets/css/DetailsComments.css b/assets/css/DetailsComments.css index 13178b2..565671d 100644 --- a/assets/css/DetailsComments.css +++ b/assets/css/DetailsComments.css @@ -165,10 +165,12 @@ } .input-box .bottom .operate .item { display: inline-flex; - margin-right: 20px; position: relative; z-index: 1; } +.input-box .bottom .operate .item:not(:last-of-type) { + margin-right: 20px; +} .input-box .bottom .operate .item.pitch .emoji-box { display: flex; } @@ -191,14 +193,14 @@ /* 鼠标悬停时显示为可点击 */ } .input-box .bottom .operate .item .emoji-box { - width: 581px; + width: 501px; border-radius: 8px; background-color: #fff; filter: drop-shadow(0 0 11px rgba(0, 0, 0, 0.1)); top: 45px; position: absolute; z-index: 1; - left: -14px; + left: -15px; border: 1px solid #ebebeb; display: none; flex-wrap: wrap; @@ -255,15 +257,20 @@ padding: 0 8px; margin-left: 9px; display: none; + position: absolute; + width: max-content; + top: 50%; + transform: translateY(-50%); + left: 20px; } .input-box .bottom .btn { font-size: 14px; - color: #333; width: 80px; height: 28px; line-height: 28px; text-align: center; - background-color: #fddf6d; + background-color: var(--main-color); + color: #fff; border-radius: 43px; cursor: pointer; } @@ -278,6 +285,11 @@ } .comment-list { margin-bottom: 78px; + padding-top: 17px; +} +.comment-list .input-box { + margin-bottom: 12px; + margin-right: 0; } .comment-list .comment-item { padding-right: 30px; @@ -334,35 +346,43 @@ .comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box { position: relative; } -.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box:hover .report-box { - display: flex; +.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box:hover .operate-box { + display: block; } .comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .menu-icon { width: 14px; height: 14px; cursor: pointer; } -.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .report-box { +.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .operate-box { display: none; + flex-direction: column; position: absolute; top: 24px; right: 0; - width: 60px; - height: 24px; - background-color: #f6f6f6; - border: 1px solid #d7d7d7; - border-radius: 5px; font-size: 12px; color: #7f7f7f; cursor: pointer; + width: 60px; + z-index: 2; + border-radius: 5px; + background-color: #f6f6f6; + border: 1px solid #d7d7d7; } -.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .report-box::after { +.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .operate-box .item { + height: 24px; +} +.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .operate-box .item:not(:last-of-type) { + border-bottom: 1px solid #d7d7d7; +} +.comment-list .comment-item .comment-content .comment-header .comment-header-right .menu-box .operate-box::after { content: ""; width: 58px; height: 36px; position: absolute; top: -14px; right: 0; + z-index: -1; } .comment-list .comment-item .comment-content .comment-header .comment-header-right .comment-icon { width: 14px; @@ -396,6 +416,11 @@ color: #92a1bf; display: inline; } +.comment-list .comment-item .comment-content .comments-img { + width: 75px; + margin-bottom: 13px; + border-radius: 5px; +} .comment-list .comment-item .comment-content .alreadyVoted { font-size: 12px; color: #aaaaaa; @@ -540,3 +565,25 @@ .empty-box { padding: 80px 0 110px; } +.detail-image-mask { + width: 100%; + height: 100%; + max-width: none; + max-height: none; + border: none; + position: fixed; + top: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.8); + z-index: 100; +} +.detail-image-mask .detail-image { + width: 80vw; + height: 80vh; + border-radius: 8px; + background-color: #111; +} +.detail-image-mask .detail-image .detail-img { + max-width: 100%; + max-height: 100%; +} diff --git a/assets/css/DetailsComments.less b/assets/css/DetailsComments.less index eaa25cd..b2903a7 100644 --- a/assets/css/DetailsComments.less +++ b/assets/css/DetailsComments.less @@ -199,9 +199,13 @@ .operate { .item { display: inline-flex; - margin-right: 20px; position: relative; z-index: 1; + + &:not(:last-of-type) { + margin-right: 20px; + } + &.pitch { .emoji-box { display: flex; @@ -227,7 +231,7 @@ } .emoji-box { - width: 581px; + width: 501px; border-radius: 8px; background-color: #fff; // box-shadow: 0 0 11px rgba(0, 0, 0, 0.1); @@ -235,7 +239,7 @@ top: 45px; position: absolute; z-index: 1; - left: -14px; + left: -15px; border: 1px solid rgb(235, 235, 235); display: none; flex-wrap: wrap; @@ -295,17 +299,24 @@ padding: 0 8px; margin-left: 9px; display: none; + position: absolute; + width: max-content; + top: 50%; + transform: translateY(-50%); + left: 20px; } } } .btn { font-size: 14px; - color: #333; + // color: #333; width: 80px; height: 28px; line-height: 28px; text-align: center; - background-color: rgba(253, 223, 109, 1); + // background-color: rgba(253, 223, 109, 1); + background-color: var(--main-color); + color: #fff; border-radius: 43px; cursor: pointer; } @@ -324,6 +335,13 @@ .comment-list { margin-bottom: 78px; + padding-top: 17px; + + .input-box { + margin-bottom: 12px; + margin-right: 0; + } + .comment-item { &:not(:first-of-type) { .comment-avatar { @@ -389,8 +407,8 @@ .menu-box { position: relative; - &:hover .report-box { - display: flex; + &:hover .operate-box { + display: block; } .menu-icon { @@ -399,20 +417,26 @@ cursor: pointer; } - .report-box { + .operate-box { display: none; + flex-direction: column; position: absolute; top: 24px; right: 0; - width: 60px; - height: 24px; - background-color: rgba(246, 246, 246, 1); - border: 1px solid rgba(215, 215, 215, 1); - border-radius: 5px; font-size: 12px; color: #7f7f7f; cursor: pointer; - + width: 60px; + z-index: 2; + border-radius: 5px; + background-color: rgba(246, 246, 246, 1); + border: 1px solid rgba(215, 215, 215, 1); + .item { + height: 24px; + &:not(:last-of-type) { + border-bottom: 1px solid rgba(215, 215, 215, 1); + } + } &::after { content: ""; width: 58px; @@ -420,6 +444,7 @@ position: absolute; top: -14px; right: 0; + z-index: -1; } } } @@ -463,6 +488,12 @@ } } + .comments-img { + width: 75px; + margin-bottom: 13px; + border-radius: 5px; + } + .alreadyVoted { font-size: 12px; color: #aaaaaa; @@ -633,3 +664,28 @@ .empty-box { padding: 80px 0 110px; } + +.detail-image-mask { + width: 100%; + height: 100%; + max-width: none; + max-height: none; + border: none; + position: fixed; + top: 0; + left: 0; + background-color: rgba(255, 255, 255, 0.8); + z-index: 100; + + .detail-image { + width: 80vw; + height: 80vh; + border-radius: 8px; + background-color: #111; + + .detail-img { + max-width: 100%; + max-height: 100%; + } + } +} diff --git a/components/DetailsArea.vue b/components/DetailsArea.vue index cc288ca..f2249cd 100644 --- a/components/DetailsArea.vue +++ b/components/DetailsArea.vue @@ -18,19 +18,19 @@ {{ info["views"] }} -
+ +
+ + + {{ info["likes"] || "" }}
{{ commentComments }}
-
@@ -243,6 +243,7 @@ onBeforeUnmount(() => { const randomBottomEmojis = inject("randomBottomEmojis") const selectEomji = inject("selectEomji") const jointriposte = inject("jointriposte") +