新增虚拟滚动阈值逻辑以优化性能,改进可视化数据计算和滚动处理,确保在数据量较小时直接渲染全部数据。

This commit is contained in:
2024-12-11 15:49:05 +08:00
parent 0a8af1d97b
commit d218789c2b
2 changed files with 34 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ import ProjectList from './components/ProjectList.vue'
import type { ListItem, MenuItem } from '@/types'
// 生成模拟数据
const listData: ListItem[] = Array.from({ length: 789 }, (_, i) => ({
const listData: ListItem[] = Array.from({ length: 50 }, (_, i) => ({
id: i,
name: `project-${i + 1}`,
path: `/Users/lanyuanxiaoyao/Project/IdeaProjects/project-${i + 1}`,