let hd ={
    action:{},
    get proto(){
        return this.action

    },
    set proto(obj){
        if(obj instanceof Object){
            this.action=obj;
        }

    }
}

hd.proto="abl";
hd.proto={view:function(){}};
console.log(hd.proto);
//__proto__原来是属性访问器
console.dir(hd);

 

posted on 2022-01-28 17:44  weakup  阅读(37)  评论(0)    收藏  举报