1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        Melchior.jsJavaScript 模塊加載器

        聯(lián)合創(chuàng)作 · 2023-09-22 08:47

        Melchior.js 是一個(gè)模式加載器,提供通過鏈?zhǔn)侥K定義的API,讓你可以遠(yuǎn)離那些長長的AMD定義和重復(fù)的模塊名。它起步非常容易,定制方便,而且壓縮版只有3KB。

        在線演示

        示例代碼:

        // create modulemelchiorjs.module('yourModule')// define dependencies.require('dependencyUno')
        .require('dependencyDuo', 'duo')// define module body.body(function () {    // `dependencyUno` is available here!
            dependencyUno.doSomething();    // aliased `dependencyDuo` is available as `duo`!
            duo.doSomething();    // return methods for other modules
            return {
                method: function () { ... },
                anotherMethod: function () { ... }
            };
        });

        配置:

        melchiorjs.config({
            paths: {        'jQuery': 'path/to/jquery',        'underscore': 'path/to/underscore',        'myModule': 'path/to/myModule'
            },    // provide shim to non-melchior modules if needed
            // declare globals returned by libraries and deps
            shim: {
                underscore: {
                    exports: '_'
                }
            }
        });

        支持的瀏覽器:

        Firefox IE Opera
        1+ ? 2+ ? 8+ ? 10+ ? 3+ ?

         

        瀏覽 29
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        評論
        圖片
        表情
        推薦
        點(diǎn)贊
        評論
        收藏
        分享

        手機(jī)掃一掃分享

        編輯 分享
        舉報(bào)
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            操肥逼| 国产偷拍自拍在线视频 | h文在线观看 | 欧美a在线视频 | 免费无遮挡婬乱男女视频网站野外 | 日韩欧美黄色网址 | 久久91视频观看 | 涩涩屋av| 性少妇√jdeos七xf一 美女被艹的网站 | 色激情小说 |