1 代碼如下function Vue () { this._init()
}
Vue.prototype._init = function () { let vm = this}Object.defineProperty(Vue.prototype, '$ssrContext', {
get () { return false
}
})const vm = new Vue()2 實例化后在瀏覽器查看到如下3 問題同樣在原型上定義的方法,使用Object.defineProperty方法,為什么在當前實例下就有一個$ssrContext屬性,是否是瀏覽器實現原因?
Object.defineProperty定義的屬性在谷歌瀏覽器顯示的問題
MMMHUHU
2019-02-06 21:33:43