apicloud

apicloud : openFrameGroup 使用

无人久伴 提交于 2019-11-27 12:57:33
1111 <script type="text/javascript"> apiready = function () { goItemFrame( ); } function goItemFrame( ){ api.openFrameGroup({ // 打开 frame 组 name: 'group', scrollEnabled: false, rect: { x: 0, y: $api.dom('header').offsetHeight, w: api.winWidth, h: $api.dom('#main').offsetHeight }, index: 0, frames: [ { name: 'report', url: './html/report.html', bounces:true, vScrollBarEnabled:false, hScrollBarEnabled:false } { name: 'center', url: './html/center.html', bounces:true, vScrollBarEnabled:false, hScrollBarEnabled:false }] }, function (ret, err) { alert(ret.index); //获取当前切换到的索引值 }); } function

【APICloud】随笔

匆匆过客 提交于 2019-11-27 07:57:25
页面head中添加: < meta name = " viewport " content = " maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0 " /> < meta name = " format-detection " content = " telephone=no,email=no,date=no,address=no " > 字体大小支持12px以下 循环给元素绑定事件,for循环需要用let var $typeLi = $api . domAll ( '#typeUl li' ) ; for ( let i = 0 , l = $typeLi . length ; i < l ; i ++ ) { $api . addEvt ( $typeLi [ i ] , 'click' , function ( ) { ... } ) } 来源: https://blog.csdn.net/github_39365750/article/details/99575975