优化列表显示效果

This commit is contained in:
2024-12-11 12:29:51 +08:00
parent 9af3b116d1
commit d5500c8f49
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import VirtualList from './components/VirtualList.vue'
const listConfig = { const listConfig = {
itemHeight: 50, itemHeight: 50,
itemPadding: 16, itemPadding: 16,
bufferCount: 2, bufferCount: 10,
scrollDebounceTime: 16, scrollDebounceTime: 16,
} }

View File

@@ -290,14 +290,14 @@ onBeforeUnmount(() => {
padding: 8px 16px; padding: 8px 16px;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #e8e8e8; transition: background-color 0.8s ease;
transition: background-color 0.2s;
cursor: pointer; cursor: pointer;
background-color: white; background-color: white;
} }
/* 简单的选中高亮效果 */
.list-item.selected { .list-item.selected {
background-color: #e6f7ff; background-color: rgba(64, 169, 255, 0.15);
} }
/* 默认列表项样式 */ /* 默认列表项样式 */