fix(component): 修复组件名称错误和props类型定义

refactor(component): 重构组件模板结构,移除重复代码

feat(component): 添加可选props支持外部数据传入

style(css): 优化样式布局和响应式设计

fix(js): 修复URL路径处理逻辑和滚动加载问题

feat(search): 新增搜索页推荐内容和空状态处理

chore: 添加新图标资源文件
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-12-22 19:01:00 +08:00
parent acf03efaf0
commit 43556292d2
26 changed files with 783 additions and 225 deletions

View File

@@ -42,6 +42,13 @@ body {
overflow: hidden;
text-overflow: ellipsis;
}
.one-line-display-v2 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.two-line-display {
display: -webkit-box;
-webkit-box-orient: vertical;
@@ -243,7 +250,6 @@ body {
color: #555555;
white-space: pre-wrap;
margin-bottom: 15px;
display: block;
}
.item-box.item-forum .picture {
overflow-x: auto;
@@ -334,7 +340,7 @@ body {
font-size: 14px;
color: #555555;
margin-bottom: 20px;
display: block;
width: 100%;
}
.item-box.item-summary .total {
font-size: 14px;
@@ -350,15 +356,18 @@ body {
.item-box.item-summary .list {
overflow: auto;
margin-bottom: 16px;
max-width: 100%;
}
.item-box.item-summary .list .item-content {
width: 280px;
flex-direction: column;
justify-content: space-between;
padding: 10px;
flex: 1;
}
.item-box.item-summary .list .item {
width: 280px;
flex-shrink: 0;
height: 110px;
background-color: rgba(242, 242, 242, 0);
border: 1px solid #ebebeb;
@@ -702,6 +711,7 @@ body {
background-color: #f6f6f6;
border-radius: 10px;
padding: 0 10px;
width: 100%;
}
.item-box .comment .icon {
width: 20px;
@@ -713,7 +723,7 @@ body {
font-size: 14px;
color: #7f7f7f;
flex: 1;
width: 10px;
width: 0;
}
.item-box .bottom {
height: 55px;

View File

@@ -54,6 +54,14 @@ body {
text-overflow: ellipsis;
}
.one-line-display-v2 {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.two-line-display {
display: -webkit-box;
-webkit-box-orient: vertical;
@@ -289,7 +297,7 @@ body {
color: #555555;
white-space: pre-wrap;
margin-bottom: 15px;
display: block;
// display: block;
}
.picture {
@@ -404,7 +412,7 @@ body {
font-size: 14px;
color: #555555;
margin-bottom: 20px;
display: block;
width: 100%;
}
.total {
@@ -423,16 +431,18 @@ body {
.list {
overflow: auto;
margin-bottom: 16px;
max-width: 100%;
.item-content {
width: 280px;
flex-direction: column;
justify-content: space-between;
padding: 10px;
flex: 1;
}
.item {
width: 280px;
flex-shrink: 0;
height: 110px;
background-color: rgba(242, 242, 242, 0);
border: 1px solid rgba(235, 235, 235, 1);
@@ -852,6 +862,7 @@ body {
background-color: rgba(246, 246, 246, 1);
border-radius: 10px;
padding: 0 10px;
width: 100%;
.icon {
width: 20px;
@@ -864,7 +875,7 @@ body {
font-size: 14px;
color: #7f7f7f;
flex: 1;
width: 10px;
width: 0;
}
}
@@ -3024,4 +3035,4 @@ td {
100% {
top: 0;
}
}
}

View File

@@ -1,6 +1,7 @@
#search {
max-width: 1200px;
margin: 0 auto;
min-width: 320px;
}
#search .search-box {
width: 460px;
@@ -70,6 +71,7 @@
align-items: flex-end;
}
#search .matter .matter-content {
min-width: 0;
margin-right: 12px;
position: sticky;
z-index: 1;
@@ -158,15 +160,173 @@
#search .search-no .earth-icon {
width: 239px;
height: 180px;
margin: 0 auto;
margin: 0 auto 20px;
}
#search .search-no .input-box {
width: 903px;
max-width: 903px;
width: 100%;
height: 60px;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 6px;
margin: 0 auto 30px;
padding-right: 10px;
}
#search .search-no .input-box .input {
font-size: 16px;
border: none;
outline: none;
height: 100%;
padding: 0 15px;
border-radius: 6px;
}
#search .search-no .input-box .btn {
width: 120px;
height: 40px;
line-height: 40px;
text-align: center;
background-color: #d35110;
border-radius: 8px;
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #ffffff;
cursor: pointer;
}
#search .search-no .recommend-box {
max-width: 903px;
width: 100%;
gap: 10px;
margin: 0 auto;
}
#search .search-no .recommend-box .recommend-head {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #000000;
margin-bottom: 15px;
}
#search .search-no .recommend-box .recommend-head .icon {
width: 10px;
height: 18px;
margin-right: 10px;
}
#search .search-no .recommend-box .hot-box {
width: 100%;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding-top: 20px;
padding-bottom: 12px;
}
#search .search-no .recommend-box .hot-box .hot-list {
flex-wrap: wrap;
padding-left: 20px;
padding-right: 12px;
}
#search .search-no .recommend-box .hot-box .hot-list .item {
font-size: 14px;
color: #333333;
height: 32px;
line-height: 32px;
padding: 0 13px;
margin-bottom: 10px;
background-color: #f6f6f6;
border: 1px solid #f2f2f2;
border-radius: 16px;
margin-right: 8px;
cursor: pointer;
}
#search .search-no .recommend-box .hot-box .hot-list .item .icon {
width: 17px;
height: 20px;
margin-right: 5px;
}
#search .search-no .recommend-box .read-box {
width: 291px;
background-color: #ffffff;
border: 1px solid #e9eef2;
border-radius: 10px;
padding-top: 20px;
padding-bottom: 12px;
}
#search .search-no .recommend-box .read-box .read-list {
padding-left: 20px;
padding-right: 12px;
}
#search .search-no .recommend-box .read-box .read-list .item {
font-size: 14px;
color: #555555;
cursor: pointer;
}
#search .search-no .recommend-box .read-box .read-list .item:hover {
color: #000000;
}
#search .search-no .recommend-box .read-box .read-list .item:not(:last-of-type) {
margin-bottom: 12px;
}
#search .search-no .recommend-box .read-box .read-list .item .dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #86d0b1;
border: 1px solid #239f6c;
margin-right: 10px;
}
@media screen and (max-width: 768px) {
#search {
padding: 0 10px;
}
#search .search-no .earth-icon {
width: 60%;
max-width: 220px;
height: auto;
margin-bottom: 10px;
}
#search .search-no .input-box {
width: 100%;
height: 48px;
margin-bottom: 20px;
}
#search .search-no .input-box .btn {
width: 80px;
height: 36px;
line-height: 36px;
font-size: 14px;
}
#search .search-no .recommend-box {
width: 100%;
flex-direction: column;
height: auto;
}
#search .search-no .recommend-box .hot-box,
#search .search-no .recommend-box .read-box {
width: 100%;
}
.main-new {
width: 100%;
flex-direction: column;
}
.main-new .wp {
width: 100%;
min-width: 100%;
margin-right: 0;
}
.main-new .rightright {
width: 100%;
}
.item-box {
padding: 15px 10px 0;
}
.side-box {
width: 100%;
}
.head-top .input-box {
width: 100%;
}
.head-top .input-box .placeholder {
width: 100%;
}
}

View File

@@ -1,6 +1,7 @@
#search {
max-width: 1200px;
margin: 0 auto;
min-width: 320px;
.search-box {
width: 460px;
@@ -80,6 +81,7 @@
}
.matter-content {
min-width: 0;
margin-right: 12px;
position: sticky;
z-index: 1;
@@ -200,20 +202,196 @@
.earth-icon {
width: 239px;
height: 180px;
margin: 0 auto;
margin: 0 auto 20px;
}
.input-box {
width: 903px;
max-width: 903px;
width: 100%;
// width: 903px;
height: 60px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 6px;
margin: 0 auto 30px;
padding-right: 10px;
.input {
font-size: 16px;
font-size: 16px;
border: none;
outline: none;
height: 100%;
padding: 0 15px;
border-radius: 6px;
}
.btn {
width: 120px;
height: 40px;
line-height: 40px;
text-align: center;
background-color: rgba(211, 81, 16, 1);
border-radius: 8px;
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #ffffff;
cursor: pointer;
}
}
.recommend-box {
max-width: 903px;
width: 100%;
gap: 10px;
margin: 0 auto;
.recommend-head {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 16px;
color: #000000;
margin-bottom: 15px;
.icon {
width: 10px;
height: 18px;
margin-right: 10px;
}
}
.hot-box {
// width: 291px;
width: 100%;
// height: 365px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding-top: 20px;
padding-bottom: 12px;
.hot-list {
flex-wrap: wrap;
padding-left: 20px;
padding-right: 12px;
.item {
font-size: 14px;
color: #333333;
height: 32px;
line-height: 32px;
padding: 0 13px;
margin-bottom: 10px;
background-color: rgba(246, 246, 246, 1);
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 16px;
margin-right: 8px;
cursor: pointer;
.icon {
width: 17px;
height: 20px;
margin-right: 5px;
}
}
}
}
.read-box {
width: 291px;
background-color: rgba(255, 255, 255, 1);
border: 1px solid rgba(233, 238, 242, 1);
border-radius: 10px;
padding-top: 20px;
padding-bottom: 12px;
.read-list {
padding-left: 20px;
padding-right: 12px;
.item {
font-size: 14px;
color: #555555;
cursor: pointer;
&:hover {
color: #000000;
}
&:not(:last-of-type) {
margin-bottom: 12px;
}
.dot {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #86d0b1;
border: 1px solid #239f6c;
margin-right: 10px;
}
}
}
}
}
}
}
@media screen and (max-width: 768px) {
#search {
padding: 0 10px;
}
#search .search-no .earth-icon {
width: 60%;
max-width: 220px;
height: auto;
margin-bottom: 10px;
}
#search .search-no .input-box {
width: 100%;
height: 48px;
margin-bottom: 20px;
}
#search .search-no .input-box .btn {
width: 80px;
height: 36px;
line-height: 36px;
font-size: 14px;
}
#search .search-no .recommend-box {
width: 100%;
flex-direction: column;
height: auto;
}
#search .search-no .recommend-box .hot-box,
#search .search-no .recommend-box .read-box {
width: 100%;
// margin-bottom: 15px;
}
.main-new {
width: 100%;
flex-direction: column;
}
.main-new .wp {
width: 100%;
min-width: 100%;
margin-right: 0;
}
.main-new .rightright {
width: 100%;
}
.item-box {
padding: 15px 10px 0;
}
.side-box {
width: 100%;
}
.head-top .input-box {
width: 100%;
}
.head-top .input-box .placeholder {
width: 100%;
}
}