我有一个流星项目(我运行它mrt –release 0.6.5.1).在这个项目中,我使用bootstrap2.3和
jquery-ui 1.9.2但是由于它们是冲突的,所以它们运行不正常.所以我可以
here,建议:
you should call always jquery-ui before bootstrap,if not you will see
a lot of problems like tooltips and so on.
现在,我已经使用了将bootstrap包添加到我的流星中
meteor add bootstrap mrt add bootstrap
我已经将jquery-ui.js(从here下载)添加到客户端/ lib中,现在看起来它们是冲突的.我应该怎么做才能在引导程序之前加载jquery-ui?
我通过使用chrome-> developer-> sources->包找到了我的bootstrap版本
这是我在meteor项目中的projectFolder / smart.json文件.
{ "packages": { "router": {},"datatables": {},"select2": {},"accounts-ui-bootstrap-dropdown": {},"font-awesome": {},"VerbalExpressions": {},"jquery-scrollTo": {},"bootBoxjs": {},"event-hooks": {},"moment": {} } }
最后,这是我的.meteor / packages文件:
# Meteor packages used by this project,one per line. # # 'meteor add' and 'meteor remove' will edit this file for you,# but you can also edit it by hand. standard-app-packages autopublish insecure preserve-inputs accounts-base accounts-password router event-hooks bootstrap accounts-ui-bootstrap-dropdown moment datatables select2 jquery-scrollTo VerbalExpressions http
解决方法
尝试使用meteor add安装bootstrap-3和jquery-ui作为软件包而不是尝试手动将jquery-ui js文件放入client /或lib /
引导:
$meteor add twbs:bootstrap
Bootstrap-3(而不是Bootstrap,不另外):
$meteor add ian:accounts-ui-bootstrap-3
jQuery的用户界面:
$meteor add mizzao:jquery-ui
几乎所有您需要的包装都可以在atmospherejs找到.