Tags → #Vue
-
考虑路由来源的 Vue 页面缓存逻辑
本文介绍了在Vue框架中实现页面缓存逻辑的两种方案。初版方案通过keep-alive和router-view结合使用,以及路由守卫来控制页面缓存,但存在逻辑复杂的问题。新方案简化了逻辑,通过构建目标页面和来源页面的关系,优化了缓存机制,使得代码更加简洁且易于理解。
-
Vue 组件的 Props 到底能不能改?
深入探讨 Vue 单向数据流与 Props 修改机制。分析 ReadonlyReactiveHandler 的实现原理,以及在紧密耦合场景下修改对象类型 Props 的可行性与风险。
-
写 Vue 我建议非必要别用 watch
Vue 里的 watch 很好用,但是过度依赖 watch 真的好吗?本文通过一个真实场景分析 watch 的滥用问题,并给出更优雅的替代方案。
-
Vue 优化速查
Vue 2 性能优化实战速查:涵盖组件拆分、利用 computed 缓存、数据扁平化、Object.freeze 冻结大对象及分片渲染等高效策略。
-
Vue's asynchronous update mechanism
Deep dive into Vue's asynchronous update mechanism: understanding queueWatcher and the nextTick strategy. Learn how Vue batches data changes to minimize DOM manipulations and ensure smooth performance.
-
El mecanismo de actualización asíncrona de Vue.
Explora el mecanismo de actualización asíncrona de Vue: desde queueWatcher hasta nextTick. Aprende cómo Vue optimiza el rendimiento agrupando cambios en colas y cuándo acceder al DOM actualizado.
-
Vueの非同期更新メカニズム
Vue の非同期更新メカニズム(nextTick)を徹底解説:setter から queueWatcher、そして flushSchedulerQueue までのフローを辿ります。DOM 更新のタイミングとマイクロタスクの活用法を学びます。
-
Vue 异步更新机制深度解析
深入剖析 Vue 异步更新原理:从 setter 触发到 queueWatcher 入队,详述 flushSchedulerQueue 的执行逻辑。解析 nextTick 如何利用微任务/宏任务优化 DOM 渲染性能。