feat: 搜索历史调整上限为30个

This commit is contained in:
chenjinsong
2022-01-26 18:13:25 +08:00
parent a8e0bc1795
commit d019a975a5

View File

@@ -81,51 +81,67 @@
.search__history {
position: absolute;
display: flex;
padding: 10px 0;
padding: 10px 0 0 0;
flex-direction: column;
width: 100%;
max-width: 1000px;
z-index: 2;
top: 47px;
border: 1px solid rgba(206,206,206,0.20);
border-radius: 2px;
background-color: white;
.history__item {
height: 35px;
display: flex;
align-items: center;
.history__items {
max-height: 300px;
overflow: auto;
.history__item {
height: 35px;
display: flex;
align-items: center;
padding-left: 30px;
font-weight: normal;
font-size: 14px;
flex-shrink: 0;
&.clear-all span {
cursor: pointer;
}
div {
color: #999;
}
.item-date {
color: #bbb;
padding: 0 20px 0 0;
}
.item-value {
flex-basis: calc(100% - 200px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
color: #444;
}
}
.history__item {
cursor: pointer;
}
.history__item:hover {
background-color: #ecf5ff;
color: #66b1ff;
}
}
.clear-all {
padding-left: 30px;
font-weight: normal;
font-size: 14px;
height: 35px;
display: flex;
align-items: center;
color: #3976CB;
&.clear-all span {
span {
cursor: pointer;
}
div {
color: #999;
}
.item-date {
color: #bbb;
padding: 0 20px 0 0;
}
.item-value {
flex-basis: calc(100% - 200px);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
color: #444;
}
}
.history__item:not(.clear-all) {
cursor: pointer;
}
.history__item:hover:not(.clear-all) {
background-color: #ecf5ff;
color: #66b1ff;
}
.history__item.clear-all {
color: #3976CB;
}
}
}