在创建Vue实例时调用 this._init 初始化。 其中就有调用 initState 初始化 export function initState (vm: Component) { // ... if (opts.computed) initComputed(vm, opts.computed) // ... } 复制代码 initState会初始化计算属性:调用 initComputed const computedWatcherOptions = { lazy: true...
在创建Vue实例时调用 this._init 初始化。 其中就有调用 initState 初始化 export function initState (vm: Component) { // ... if (opts.computed) initComputed(vm, opts.computed) // ... } 复制代码 initState会初始化计算属性:调用 initComputed const computedWatcherOptions = { lazy: true...