{"id":152697,"date":"2020-09-07T17:03:43","date_gmt":"2020-09-07T09:03:43","guid":{"rendered":"http:\/\/4563.org\/?p=152697"},"modified":"2020-09-07T17:03:43","modified_gmt":"2020-09-07T09:03:43","slug":"%e8%af%b7%e6%95%99%e4%b8%80%e4%b8%8b-object-defineproperty-%e7%9a%84%e5%ba%94%e7%94%a8%e5%9c%ba%e6%99%af","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=152697","title":{"rendered":"\u8bf7\u6559\u4e00\u4e0b Object.defineProperty \u7684\u5e94\u7528\u573a\u666f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u4e00\u4e0b Object.defineProperty \u7684\u5e94\u7528\u573a\u666f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frankkai <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u9664\u4e86 vue \u7684\u53cc\u5411\u6570\u636e\u7ed1\u5b9a\uff0c\u8fd9\u4e2a api \u6709\u66f4\u591a\u7684\u5e94\u7528\u573a\u666f\u5417\uff1f<\/p>\n<p>\u524d\u7aef V \u53cb\u4eec\u90fd\u6765\u8bf4\u8bf4\u5457\uff0c\u4e0d\u80dc\u611f\u6fc0<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3199570\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : louieliu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u73b0\u5728\u5c31\u76f4\u63a5\u7528 Proxy \u914d\u5408 Reflect \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3199571\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mutoo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u822c\u662f\u6846\u67b6\u6216\u6784\u5efa\u5de5\u5177\u7528\u6765\u5b9a\u4e49\u4e00\u4e9b\u7279\u6b8a\u63a5\u53e3\uff08\u4f8b\u5982\u53ea\u8bfb\uff09\u65f6\u4f7f\u7528\uff0c\u4f8b\u5982 webpack \u5bf9 export\/import \u7684\u5b9e\u73b0\u3002\u5e73\u65f6\u5f88\u5c11\u4f1a\u7528\u3002<\/p>\n<p>\u611f\u89c9 defineProperty \u7684\u51fa\u73b0\u66f4\u591a\u662f\u4e3a es6+ \u5b9e\u73b0\u5411\u4e0b\u517c\u5bb9\uff0c\u65b9\u4fbf\u5bf9 es5 \u8fdb\u884c polyfill \u5b9e\u73b0\u65b0\u529f\u80fd\u6253\u57fa\u7840\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3199572\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : murmur <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6709\u7684\u65f6\u5019\u53ef\u4ee5\u62ff\u6765\u5bf9\u53d8\u91cf\u8fdb\u884c\u76d1\u63a7\uff0c\u7ed1\u5b9a getter setter \u65b9\u6cd5\u6253\u65ad\u70b9<\/p>\n<p>\u5f53\u7136\u6846\u67b6\u7528\u662f\u6700\u591a\u7684\uff0c\u80fd polyfill \u5230 ie \u4e0a\u7684\u90fd\u80fd\u7528 defineProperty                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3199573\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frankkai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @murmur \u5bf9\u53d8\u91cf\u505a\u76d1\u63a7\u786e\u5b9e\u53ef\u4ee5\uff0c\u611f\u89c9\u4e5f\u7b97\u662f\u4e00\u4e2a\u57cb\u70b9\uff1a\u5728 setter \u91cc\u7edf\u8ba1\u67d0\u4e2a\u53d8\u91cf\u7684\u6b21\u6570\uff0c\u505a\u4e00\u4e9b\u65e5\u5fd7\u4e0a\u62a5\u4e4b\u7c7b\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3199574\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frankkai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @louieliu Proxy \u914d\u5408 Reflect \u5f25\u8865\u4e86 Object.defineProperty \u90a3\u4e9b\u4e0d\u8db3\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3199575\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frankkai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Mutoo \u505a\u5230\u53ea\u8bfb\u5c5e\u6027\u7684\u8bdd \u8bbe\u7f6e writable \u548c configurable \u4e3a false \u611f\u89c9\u5c31\u884c\u4e86 \u8fd9\u6837\u6709\u70b9\u50cf\u51bb\u7ed3\u5bf9\u8c61\u5c5e\u6027<br \/>\u53ea\u8bfb\u7684\u7279\u6b8a\u63a5\u53e3\u6307\u7684\u662f\u5565 \u4e0d\u592a\u61c2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u4e00\u4e0b Object.defin&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/152697"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152697"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/152697\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152697"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}