dir:
标记如:{code:"dev:tools/a-cfgs"}
<link href='{=PATH_VIEWS}/dev/assets/home.css' type='text/css' rel='stylesheet'/>
<script src='{=PATH_VENDUI}/layer/layer.js'></script>
------ ------ 或
{php}
# v4.7
eimp('/~tpl/cinfo.css'); // /views/{tpldir}/assets/cinfo.css
eimp('/~now/cijs/funcs.js'); // /views/{tpldir}/{mdodir}/cijs/funcs.js
eimp('/~base/cssjs/cinfo.css'); // /views/base/assets/cssjs/cinfo.css
eimp('/~base/jslib/jsbase.js'); // /views/base/assets/cssjs/jsbase.js
eimp('/layer/layer.js','vendui');
# v4.6
eimp('/~tpl/cinfo.css'); // /views/{tpldir}/assets/cinfo.css
eimp('/base/assets/cssjs/cinfo.css'); // /views/base/assets/cssjs/cinfo.css
eimp('/base/assets/jslib/jsbase.js'); // /views/base/assets/cssjs/jsbase.js
{php}
------ ------ 或(初始化)
eimp('initJs','zepto,jquery,bootcss,bootstrap,layer;comm;comm(-lang);user'); // in head
-=>
// js-cfgs + /base/assets/jslib/jsbase.js + /base/assets/jslib/jsbext.js
+
<script src='/views/{tpldir}/assets/comm.js'></script>
<script src='/views/{tpldir}/assets/comm-{lang}.js'></script> // {lang}=cn/en
<script src='/views/{tpldir}/assets/user.js'></script> // {lang}=cn/en
+ (以上合并,以下不合并)
<script src='{=PATH_VENDUI}/jquery/zepto-1x.js'></script> // 与jquer用其一即可
<script src='{=PATH_VENDUI}/jquery/jquery-3.x.js'></script> // 1.x/3.x自适应
<link href='{=PATH_VENDUI}/bootstrap/css/bootstrap.min.css' type='text/css' rel='stylesheet'/>
<script src='{=PATH_VENDUI}/bootstrap/js/bootstrap.min.js'></script>
<script src='{=PATH_VENDUI}/layer/layer.js'></script>
eimp('initCss','bootstrap,stpub,jstyle;comm(-mob);faqs'); // in head
-=>
@import url({=PATH_VENDUI}/bootstrap/css/bootstrap.min.css);
+ (以上不合并,以下合并)
<link href='/base/assets/jslib/stpub.css' type='text/css' rel='stylesheet'/>
<link href='/base/assets/cssjs/jstyle.css' type='text/css' rel='stylesheet'/>
<link href='/views/{tpldir}/assets/comm{-mob}.css' type='text/css' rel='stylesheet'/> // {-mob}自适应
<link href='/views/{tpldir}/assets/faqs.css' type='text/css' rel='stylesheet'/>
eimp('loadExtjs','jspop,jq_base,bootstrap,layer'); // 可放body最后
-=>
<script src='/views/base/assets/jslib/jspop.js'></script>
<script src='/views/base/assets/jslib/jq_base.js'></script>
<script src='{=PATH_VENDUI}/bootstrap/js/bootstrap.min.js'></script>
<script src='{=PATH_VENDUI}/layer/layer.js'></script>
------ ------ 或(其他)
eimp('?ajax-comjs&act=autoJQ');
basJscss::loadJqbs('zepto',0);
basJscss::loadJqbs('jquery',0);
basJscss::loadJqbs('jquery,bootcss,bootstrap,layer',0);
{/php}
提示:`/dev.php`入口为贴心猫中文文档;欢迎进入`问答`交流使用经验!
QQ群:607070548; Copyright © 2011-2018 txjia.com All rights reserved.
Run:0.000/22.515(ms); 0(sql)/1.966(MB); dev:c_demo/tpltag_main; Upd:2024-11-15 17:21:59