list.css 3.71 KB
html{
    font-size: calc(100vw/7.5) ;
}
html,body{
    width: 100%;
    height: 100%;
}
*{
    margin: 0;
    padding: 0;
    font-family: 'Source Han Sans', sans-serif;
    box-sizing: border-box;
}
div{
    line-height: 1;
}
[v-cloak] {
    display: none !important;
}

.list-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #F7F8FA;
}

.tabs {
    display: flex;
    background: #fff;
    padding: 0 .24rem;
    justify-content: space-between;
    align-items: center;
}

.tabs .left{
    display: flex;
}
.tabs .right{
    font-size: .28rem;
    color: #333;
    font-weight: 500;
    width: 1.56rem;
    height: .6rem;
    line-height: .6rem;
    border-radius: .48rem;
    background: #F1F2F4;
    text-align: center;
}

.tab-item {
    padding: .28rem 0;
    font-size: .36rem;
    color: #666;
    cursor: pointer;
    position: relative;
    margin-right: .48rem;
    transition: all 0.3s;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

.tab-item.active {
    color: #333;
    font-weight: bold;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: .08rem;
    background-color: #007bff;
}

.search-section {
    padding: .2rem;
    background: #fff;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #F7F8FA;
    border-radius: .08rem;
    padding: .2rem .24rem;
    transition: border-color 0.3s;
    font-size: .28rem;
    color: #999;
}

.search-box:focus-within {
    border-color: #007bff;
}

.search-icon {
    width: .32rem;
    height: .32rem;
    margin-right: .16rem;
    opacity: 0.6;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: .28rem;
}

.search-input::placeholder {
    color: #999;
}

.list-section {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
    border-top: none;
}

.pull-refresh {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    border-radius: 0 0 .16rem .16rem;
    background: #F7F8FA;
    opacity: 0;
}

.pull-refresh.pulling {
    height: 1.2rem;
    opacity: 1;
}

.pull-refresh.refreshing {
    height: 1.2rem;
    opacity: 1;
}

.pull-refresh-icon {
    margin-bottom: .1rem;
}

.refresh-spinner {
    width: .48rem;
    height: .48rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pull-refresh.refreshing .refresh-spinner {
    animation: spin 1s linear infinite;
}

.pull-refresh.pulling .refresh-spinner {
    animation: none;
    /* border-top-color: rgba(255, 255, 255, 0.7); */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.pull-refresh-text {
    font-size: .24rem;
    color: #333;
    font-weight: 500;
}

.list-content {
    padding: .24rem;
}

.list-item {
    padding: .36rem .4rem;
    background: white;
    border-radius: .16rem;
    margin-bottom: .2rem;
}

.item-row-up {
    color: #333;
    font-weight: bold;
    font-size: .36rem;
    margin-bottom: .28rem;
}
.item-row-down {
    color: #666;
    font-size: .28rem;
    line-height: .36rem;
}

.empty-state {
    text-align: center;
    padding: 1rem .4rem;
    color: #999;
    font-size: .32rem;
}