起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1022|回复: 1

[结贴] shell的showLeft方法和showRight方法是有问题的

[复制链接]

39

主题

144

帖子

415

积分

中级会员

Rank: 3Rank: 3

积分
415
QQ
发表于 2016-1-7 16:17:17 | 显示全部楼层 |阅读模式
本帖最后由 yyyy 于 2016-1-7 16:22 编辑
  1. 为什么多行的代码放不进?????????????,求解
复制代码
       ShellImpl.prototype.showLeft = function(){                          return this.showPage(this.wingLeftXid);
        }
        ShellImpl.prototype.showRight = function(){
                return this.showPage(this.wingRightXid);
        };
        
        //提供更好理解的api
        ShellImpl.prototype.showPage = function(url,data,options){
                ... ...
                // url 被转成对象了
                if(typeof url == "string"){
                        url = { url:url};
                }
                .....
        };
        
        ShellImpl.prototype.preShowPage = function(params,data,owner){
                // 因为是对象,所以永远不会进入
                if(params === this.wingLeftXid || params === this.wingRightXid){
                        var _xid = params;
                        params = {xid:_xid};
                }else{
                        // 参数进了这里了,开始序列化参数
                        // 因为url是地址,所以,被删除了
                        params = this.formatParam(params);
                }
                // 到了这里params 变成了 ''
                // 因为空值,所以左侧栏永远也打不开了
        }


文件路径:system/lib/portal/shellImpl.js行:499~568

ShellImpl.prototype.showLeft = function(){
     // return this.showPage(this.wingLeftXid);
      return this.preShowPage(this.wingLeftXid); // 改
};

ShellImpl.prototype.showRight = function(){
     // return this.showPage(this.wingRightXid);
      return this.preShowPage(this.wingRightXid); // 改
};

改成这样就可以打开了





发表于 2016-1-8 11:13:28 | 显示全部楼层
可以看看记账本的案例
/UI2/demo/account/list.w 执行的方法是settingBtnClick
本地测试是可以正常使用的!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-20 22:14 , Processed in 0.064747 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表