<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                CommomJS(Node) 每個文件是一個模塊,有自己的作用域。 在一個文件中的變量、函數、類都是私有的。 定義模塊: // module.js let name = ''; let hello = function () { console.log(name); }; module.exports = { name, hello } // 或者 exports.hello = hello; 加載模塊: let module = require('./module.js'); module.sayName(); module.export跟exports的區別 module.exports 方法還可以單獨返回一個數據類型(String、Number、Object...),而 exports 只能返回一個 Object 對象 所有的 exports 對象最終都是通過 module.exports 傳遞執行,因此可以更確切地說,exports 是給 module.exports 添加屬性和方法 AMD: Asynchronous Module Definition 異步模塊定義。 使用define定義模塊 require方法加載模塊 define(['module'], function() { let name = ''; function hello() { console.log(name); } return { hello } }) 使用模塊: // 通過 require 引入依賴 require(['module'], function(mod) { mod.hello(); // }) CMD define(function(require, exports, module) { // 通過 require 引入依賴 var otherModule = require('./otherModule'); // 通過 exports 對外提供接口 exports.myModule = function () {}; // 或者通過 module.exports 提供整個接口 module.exports = function () {}; }) ES6 export和import。export命令用于規定模塊的對外接口,import命令用于輸入其他模塊提供的功能。 定義模塊 export default { name: '' } 使用模塊 import people from 'a.js'; console.log(people); // UMD: Universal Module Definition,通用模塊定義規范。 其不是專門的規范,而是
                  <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>

                              哎呀哎呀视频在线观看