1.在项目中使用了requery.js  页面总是会出项一些奇怪的错误,如下

后来经过查找资料才发现,原来是因为依赖 的问题,因为require加载的时候是异步加载,而js之间是有相互依赖的,所以解决办法就是在加载之前添加依赖即可

require.config({
baseUrl:path+'/ui/common/',
paths:{
'jquery':'js/libs/jquery-1.9.1',
'domReady':'js/functionality/domReady',
'jquery.jqGrid':'plugins/other/jqgird/jquery.jqGrid.min',
'ztree.core':'plugins/other/ztree/jquery.ztree.core',
'ztree.excheck':'plugins/other/ztree/jquery.ztree.excheck',
'jquery.validator':'plugins/formElems/newValidator/js/jquery.validator',
'zh-CN':'plugins/formElems/newValidator/js/zh-CN',
'util':'js/functionality/Util',
'DialogBySHF':'plugins/formElems/dialogbyshf/js/DialogBySHF',
'alert':'plugins/modals/alertBox/AlertBox',
'WdatePicker':'plugins/formElems/time/DatePicker97/WdatePicker',
'bootstrap_datetimepicker':'plugins/formElems/time/bootstrap_datetimepicker/js/bootstrap-datetimepicker.min',
'bootstrap_datetimepicker_zh_CN':'plugins/formElems/time/bootstrap_datetimepicker/js/bootstrap-datetimepicker.zh-CN',
'echart':'plugins/chart/echarts.min',
'nicescroll':'plugins/other/nicescroll/jquery.nicescroll.min',
'bootstrap':'plugins/other/ipanel/bootstrap.min',
'jquery-ui':'plugins/other/jquery-ui/jquery-ui.min',
'content':'plugins/other/ipanel/content.min',
'tree':'plugins/formElems/downTree/ztreeSelect',
},
//关键部分
shim:{
'jquery-ui':{deps:['jquery']},
'content':{deps:['jquery']},
'bootstrap':{deps:['jquery']},
'ztree.core':{deps:['jquery']},
'ztree.exchedk':{deps:['ztree.core']}
}
});

最新文章

  1. Unity5 如何做资源管理和增量更新
  2. 静态时序分析(static timing analysis)
  3. tomcat 的安装
  4. [SQL]reName存储过程
  5. canvas-star6.html
  6. CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙。
  7. insert时出现主键冲突的处理方法【转载】
  8. hihoCoder 1389 Sewage Treatment 【二分+网络流+优化】 (ACM-ICPC国际大学生程序设计竞赛北京赛区(2016)网络赛)
  9. 细说在兄弟连搞上PHP的那些事儿
  10. Android判断应用程序从后台回到前台
  11. memcached使用文档
  12. 团队作业8——第二次项目冲刺(Beta阶段)Day5--5.23
  13. C#之结尾篇
  14. 音乐app各部分笔记(一)
  15. ScrollView与ListView的事件冲突
  16. docker 打开监听端口
  17. matlab 画图参考小程序
  18. SWT table性能改善 -- 使用VirtualTable
  19. python 爬虫 重复下载 二次请求
  20. web框架引入

热门文章

  1. 【Linux】Linux各文件夹说明
  2. ComponentSpace SAML v2.0 for .NET 使用介绍
  3. 前端技术俗语js
  4. Java算法 -- 顺序表
  5. mvn -v提示Permission denied
  6. droup
  7. LA 3401
  8. Ubuntu16.04中把默认JAVA设置为Oracle的JDK!
  9. Sublime text3!行首,行尾,批量编辑!
  10. Linux centos 7安装