摘要:
Vue 的 $nextTick 是实现异步更新的核心 API,其实现方式经历了演变: 1. 实现原理 $nextTick 的本质是将回调函数延迟到下一个 DOM 更新周期之后执行。 2. 实现方式演变 2.1 优先使用微任务 (Microtask) // Vue 2.5+ 的实现 const cal 阅读全文
posted @ 2025-10-13 16:27
阿木隆1237
阅读(11)
评论(0)
推荐(0)
摘要:
Vue2 的初始化过程主要包括以下几个核心步骤: 1. 初始化流程概述 // Vue 构造函数 function Vue(options) { this._init(options) } 2. 初始化阶段 2.1 _init() 方法 Vue.prototype._init = function(o 阅读全文
posted @ 2025-10-13 15:33
阿木隆1237
阅读(20)
评论(0)
推荐(0)
摘要:
// 防抖函数 function debounce(func, wait, immediate = false) { let timeout; return function executedFunction(...args) { const context = this; const later 阅读全文
posted @ 2025-10-13 00:49
阿木隆1237
阅读(8)
评论(0)
推荐(0)
摘要:
待添加 阅读全文
posted @ 2025-10-13 00:47
阿木隆1237
阅读(3)
评论(0)
推荐(0)
摘要:
var name = 'window' const person1 = { name: 'person1', foo1: function() { console.log(this.name) }, foo2: () => { console.log(this.name) } 阅读全文
posted @ 2025-10-13 00:30
阿木隆1237
阅读(4)
评论(0)
推荐(0)

浙公网安备 33010602011771号