在 Vue.prototype._init 方法中的 initState 中有一个对于computed 的判断,如果有则执行 initComputed 方法初始化 computed. function initMixin (Vue) { Vue.prototype._init = function (options) { var vm = this; // ... initState(vm); // ... }; } function initState (vm) { vm._watchers…