zoukankan      html  css  js  c++  java
  • Sea.js入门

    Sea.js入门

    学习了:

    https://www.cnblogs.com/doseoer/p/4007752.html

    https://blog.csdn.net/love_is_all_in_life/article/details/50354367

    https://www.jianshu.com/p/ebdf2233e3fe  这个参考一下

    #930问题:https://github.com/seajs/seajs/issues/930

    ==================================================

    sea.js require路径的问题,

    文件结构:

    test01.html
    sea-modules/sea-debug.js
    static/test01.js
    static/changeText.js

    test01.html:

        <script src="sea-modules/sea-debug.js" ></script>
        <script>
            seajs.config({
                alias:{
                    'changeText':'./changeText.js'
                }
            });
            seajs.use('./static/test01.js')
        </script>

    test01.js:

    define(function (require, exports, module) {
        // var changeText = require('./changeText.js');
        var changeText = require('changeText');
        var title = document.getElementById('title');
        // title.innerHTML = 'aaa';
        title.innerHTML = changeText.init();
    });

    使用require命令的时候,路径是相对于引用文件test01.js的,而且必须以.或者..开头,如果不是以.或者..开头,就取sea-bug.js目录了;

    使用use命令的时候,路径是相对于html文件的;

    文件结构是:

    test01.html
    sea-modules/sea-debug.js
    static/hello/test01.js
    static/hello/changeText.js

    也是一样的,也是使用同样的require语句;

    文件结构是:

    test01.html
    sea-modules/seajs/seajs/2.2.0/sea-debug.js
    static/hello/test01.js
    static/hello/changeText.js

    也是一样的,也是使用同样的require语句;

    学习了:https://www.cnblogs.com/ada-zheng/p/3284660.html

    其中的data-config是html5引入的属性,被seajs使用了,在源码中可以看到;

  • 相关阅读:
    在数据库中改变对象的所有者
    初次使用WebPartManange出现数据库连接出错的问题
    js中,实现两个数字相加
    Js版日历控件
    Repeater利用PagedDataSource进行分页
    OpenDataSOurce 指定参数
    ListBox在客户端添加删除操作
    See what actually gets indexed in FAST
    开发SharePoint 2013 App 一
    Map a Crawled Property to Managed Properties (FS4SP – PowerShell)
  • 原文地址:https://www.cnblogs.com/stono/p/9021686.html
Copyright © 2011-2022 走看看