摘要: 1.语言内部的方法,与对象关系不大,放到Reflect上 let obj = {color:'red'} Reflect.preventExtensions(obj) // Object.preventExtensions(obj) obj.num = 100 console.log(obj) 2. 阅读全文
posted @ 2021-08-16 20:47 卷叶小树 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 1.语法 let proxy = new Proxy(target,handler) let star = { name:"尼古拉斯凯奇", age:40, job:"actor", phone:"18900012345" } let proxy = new Proxy(star,{ get(tar 阅读全文
posted @ 2021-08-16 13:27 卷叶小树 阅读(104) 评论(0) 推荐(0) 编辑