<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                總結: ~~~ 用一句話來說明就是,require只能看到的只有module.exports這個對象,它是看不到exports對象的,而我們在編寫模塊時用到的exports對象實際上只是對module.exports的引用。 ~~~ 例子: ~~~ var module = { exports:{ name:"我是module的exports屬性" } }; var exports = module.exports; //exports是對module.exports的引用,也就是exports現在指向的內存地址和module.exports指向的內存地址是一樣的 console.log(module.exports); // { name: '我是module的exports屬性' } console.log(exports); // { name: '我是module的exports屬性' } exports.name = "我想改一下名字"; console.log(module.exports); // { name: '我想改一下名字' } console.log(exports); // { name: '我想改一下名字' } //看到沒,引用的結果就是a和b都操作同一內存地址下的數據 //這個時候我在某個文件定義了一個想導出的模塊 var Circle = { name:"我是一個圓", func:function(x){ return x*x*3.14; } }; exports = Circle; // 看清楚了,Circle這個Object在內存中指向了新的地址,所以exports也指向了這個新的地址,和原來的地址沒有半毛錢關系了 console.log(module.exports); // { name: '我想改一下名字' } console.log(exports); // { name: '我是一個圓', func: [Function] } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看