uniapp-performance
Skill0 starsChanged 18 days agoMITView on GitHub
uni-app / Vue3 性能优化:长列表、setData 体积、图片懒加载、首屏、内存泄漏。页面卡顿、白屏久、列表滚动掉帧时使用。
In this repository11 other files it gives its agents.
- pinia-storeSkill
- release-checklistSkill
- uniapp-cross-platformSkill
- uniapp-loginSkill
- uniapp-paymentSkill
- uniapp-permissionsSkill
- uniapp-project-structureSkill
- uniapp-requestSkill
- uniapp-subpackagesSkill
- uniapp-ui-libsSkill
- vue3-compositionSkill
The file
Files
性能优化清单
- 数据量:小程序每次渲染层通信数据要小;不要把大对象(接口原始数据)全放响应式,只保留模板用到的字段;纯展示的大数组用
shallowRef/markRaw。 - 长列表:分页 +
onReachBottom;超过数百条用虚拟列表(如z-paging的虚拟列表模式)或按页分组渲染;:key用 id。 - 图片:
lazy-load、CDN 压缩参数(宽度、webp)、指定宽高避免抖动。 - 首屏:骨架屏;接口并行
Promise.all;非关键请求放onReady之后;分包 + 预下载。 - 频繁事件:scroll/input 节流防抖;
page-scroll少用,用IntersectionObserver(uni.createIntersectionObserver)。 - 计算:模板中不调用方法计算,用 computed;
v-show用于频繁切换,v-if用于少切换。 - 内存:页面卸载清定时器、
uni.$off事件、关闭 socket、停止音视频。 - App 端:nvue /
renderjs处理复杂动画和图表;启动页接口不阻塞。 - 测量:微信开发者工具 Audits(体验评分)、Performance 面板;H5 用 Lighthouse。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

