帖子
帖子
用户
博客
课程
12
返回列表 发新帖
1
帖子
0
勋章
7
Y币
爱等待 发表于 2015-6-1 12:53
非常感谢,
我换成api.setFrameGrameAttr就好了太感谢你了

我也出现这种问题,半天都没有解决掉!


  apiready = function () {
   
        funIniGroup();
    }

    function funIniGroup(){
        var eHeaderLis = $api.domAll('#footer li'),
            frames = [];
        for (var i = 0,len = eHeaderLis.length; i < len; i++) {
                frames.push( {
                    name: 'frame'+i,
                    url: './html/frame'+i+'.html',
                    bgColor : 'rgba(0,0,0,.2)',
                    bounces:true
                } )
        }
        api.openFrameGroup({
            name: 'group',
            scrollEnabled: false,
            rect: {
                x: 0,
                y: 0,
                w: api.winWidth,
                h: $api.dom('#main').offsetHeight
            },
            index: 0,
            frames: frames
        }, function (ret, err) {

        });
        
    }

    // 随意切换按钮
    function randomSwitchBtn( tag ) {
        if( tag == $api.dom('#footer li.active') )return;
        var eFootLis = $api.domAll('#footer li'),
            index = 0;
        for (var i = 0,len = eFootLis.length; i < len; i++) {
            if( tag == eFootLis ){
                index = i;
            }else{
                $api.removeCls(eFootLis, 'active');

            }
        }
        $api.addCls( eFootLis[index], 'active');
          if(index!=1){
                      api.setFrameGroupAttr({
                                    name: 'group2',
                                    hidden:true
                          });
                 }else{
                         api.setFrameGroupAttr({
                                    name: 'group2',
                                    hidden:false
                          });
                 }
        api.setFrameGroupIndex({
            name: 'group',
            index: index
        });
    }
1
帖子
0
勋章
7
Y币
杨凯凯 发表于 2016-6-1 17:22
我也出现这种问题,半天都没有解决掉!

希望大神能看看,非常感谢

4
帖子
0
勋章
2750
Y币
杨凯凯 发表于 2016-6-1 17:22
希望大神能看看,非常感谢

你有打印过有调用到api.setFrameGroupAttr({没有,而且为什么要这样隐藏?在窗口里有打开FRAME吗,如果打开了应该在FRAME调用setFrameGroupAttr,而不是在切换显示哪个子窗口时隐藏窗口组

你现在的情况是又调用setFrameGroupAttr,又调用setFrameGroupIndex,几个意思?
45
帖子
0
勋章
101
Y币
randomSwitchBtn(obj, index)  的index是什么值?
12
您需要登录后才可以回帖 登录

本版积分规则