/* pages/collection/index.wxss */ /* 页面容器 */ .page-container { width: 100%; background-color: #f5f5f5; min-height: 100vh; box-sizing: border-box; } /* 筛选和搜索栏 */ .filter-bar { display: flex; align-items: center; padding: 16rpx; background-color: #f0f9f0; border-bottom: 1rpx solid #d4edda; box-sizing: border-box; position: sticky; top: 0; z-index: 900; flex-wrap: wrap; gap: 12rpx; min-height: 100rpx; overflow-x: hidden; } .filter-tabs { display: flex; gap: 8rpx; flex-shrink: 0; } .filter-tab { padding: 6rpx 12rpx; border-radius: 16rpx; background-color: #f0f0f0; font-size: 22rpx; color: #666; transition: all 0.3s; white-space: nowrap; } .filter-tab.active { background-color: #4CAF50; color: white; } .search-container { flex: 1; min-width: 150rpx; position: relative; margin: 0 8rpx; flex-basis: 0; max-width: 400rpx; } .search-input { width: 100%; flex: 1; padding: 16rpx 20rpx; border: 1rpx solid #e0e0e0; border-radius: 12rpx; font-size: 28rpx; box-sizing: border-box; background-color: #f9f9f9; min-height: 70rpx; } .search-input:focus { border-color: #4CAF50; background-color: #ffffff; box-shadow: 0 0 0 2rpx rgba(76, 175, 80, 0.1); } /* 高亮效果 */ .highlight { background-color: #FFF3CD; color: #856404; padding: 0 4rpx; border-radius: 4rpx; font-weight: 500; } .filter-button { display: flex; align-items: center; gap: 6rpx; padding: 12rpx 16rpx; background-color: #4CAF50; color: white; border-radius: 10rpx; font-size: 24rpx; flex-shrink: 0; min-height: 60rpx; white-space: nowrap; } .filter-icon { font-size: 24rpx; } .filter-text { font-size: 22rpx; } /* 二维码列表 */ .qr-list { padding: 16rpx; box-sizing: border-box; } /* 空状态 */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 100rpx 0; color: #999; text-align: center; } .empty-image { width: 120rpx; height: 120rpx; margin-bottom: 24rpx; opacity: 0.5; } .empty-text { font-size: 28rpx; margin-bottom: 8rpx; color: #666; } .empty-subtext { font-size: 24rpx; color: #999; } /* 二维码项 */ .qr-item { background-color: white; border-radius: 12rpx; margin-bottom: 16rpx; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06); overflow: hidden; } .qr-item-header { display: flex; align-items: center; justify-content: space-between; padding: 16rpx; cursor: pointer; } .qr-item-info { flex: 1; overflow: hidden; } .qr-item-actions { display: flex; align-items: center; gap: 16rpx; } .save-button { padding: 8rpx 16rpx; background-color: #4CAF50; color: white; border-radius: 8rpx; font-size: 22rpx; cursor: pointer; transition: all 0.3s; } .save-button:hover { background-color: #45a049; } .qr-item-info rich-text { display: block; font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 8rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qr-item-details { display: flex; align-items: center; font-size: 24rpx; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qr-item-details rich-text { display: inline; font-size: 24rpx; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qr-item-details text { margin-left: 8rpx; font-size: 24rpx; color: #666; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .qr-item-arrow { font-size: 24rpx; color: #999; margin-left: 16rpx; flex-shrink: 0; } /* 二维码详情 */ .qr-item-content { padding: 0 16rpx 16rpx; border-top: 1rpx solid #f0f0f0; animation: slideDown 0.3s ease; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10rpx); } to { opacity: 1; transform: translateY(0); } } .qr-image { width: 200rpx; height: 200rpx; margin: 16rpx auto; display: block; border-radius: 8rpx; } .qr-info-center { display: flex; flex-direction: column; align-items: center; margin-top: 16rpx; } .qr-info-item { margin-bottom: 8rpx; font-size: 24rpx; color: #333; text-align: center; width: 100%; max-width: 200rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 底部按钮 */ .bottom-section { padding: 20rpx 16rpx; background-color: white; border-top: 1rpx solid #e0e0e0; margin-top: 20rpx; } .generate-button { width: 100%; height: 80rpx; background-color: #4CAF50; color: white; border: none; border-radius: 12rpx; font-size: 28rpx; font-weight: 500; display: flex; align-items: center; justify-content: center; } .generate-button-text { color: white; font-size: 28rpx; } /* 筛选侧边栏 */ .sidebar { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000; display: flex; flex-direction: column; } .sidebar-overlay { flex: 1; background-color: rgba(0, 0, 0, 0.5); } .sidebar-content { position: absolute; top: 0; right: 0; bottom: 0; width: 70%; max-width: 300rpx; background-color: white; box-shadow: -4rpx 0 10rpx rgba(0, 0, 0, 0.1); animation: slideIn 0.3s ease; } @keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } } .sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20rpx; border-bottom: 1rpx solid #e0e0e0; } .sidebar-title { font-size: 28rpx; font-weight: 600; color: #333; } .sidebar-close { font-size: 32rpx; color: #999; cursor: pointer; } .sidebar-body { padding: 20rpx; max-height: calc(100% - 80rpx); overflow-y: auto; } .sidebar-item { padding: 16rpx 0; border-bottom: 1rpx solid #f0f0f0; cursor: pointer; } .sidebar-item:last-child { border-bottom: none; } .sidebar-item-text { font-size: 24rpx; color: #333; } /* 响应式调整 */ @media (max-width: 375px) { .filter-bar { flex-direction: column; align-items: stretch; } .filter-tabs { justify-content: center; } .search-container { min-width: 100%; margin: 8rpx 0; } .filter-button { align-self: center; } } /* 针对中等屏幕的调整 */ @media (min-width: 376px) and (max-width: 480px) { .filter-bar { flex-wrap: nowrap; } .filter-tabs { flex-shrink: 0; } .search-container { flex: 1; min-width: 150rpx; max-width: 300rpx; } .filter-button { flex-shrink: 0; } } /* 针对大屏幕的调整 */ @media (min-width: 481px) { .filter-bar { flex-wrap: nowrap; } .search-container { flex: 1; min-width: 200rpx; max-width: 400rpx; } } /* 滚动条样式 */ ::-webkit-scrollbar { width: 4rpx; height: 4rpx; } ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 2rpx; } ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 2rpx; } ::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }