尤大的Vue3已经初露头角 指路,我们当然也要看看咯
一看发现,嗬,高级,竟然有没听过的词(暴露了我的无知,请轻喷o(╥﹏╥)o)
不过没有关系,没听过还不会查吗?所以这篇文章可以看成是 Vue3 特性词汇扫盲篇
Proxy
相比Object.defineProperty更加完善
function extend(sup, base) {
var descriptor = Object.getOwnPropertyDescriptor(
base.prototype, "constructor"
); // base.prototype.constructor --> base
base.prototype = Object.create(sup.prototype