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

QQ登录

只需一步,快速开始

查看: 1750|回复: 3

[结贴] 版主请进:buttonGroup url咨询

[复制链接]

25

主题

57

帖子

233

积分

中级会员

Rank: 3Rank: 3

积分
233
QQ
发表于 2018-3-26 17:54:41 | 显示全部楼层 |阅读模式
本帖最后由 zhoubincibn 于 2018-3-26 18:00 编辑

模仿的网易新闻, index_main.w 下方定义了 buttonGroup 代码如下,默认进入到"新闻"页:

<div component="$UI/system/components/justep/button/buttonGroup" class="btn-group btn-group-justified x-card x-wangyi"
        tabbed="true" xid="buttonGroup1">
        <a component="$UI/system/components/justep/button/button" class="btn btn-link btn-icon-top active"
          label="新闻" xid="newsBtn" icon="icon-android-note" target="newsContent">
          <i xid="i4" class="icon icon-android-note"/>  
          <span xid="span6">新闻</span>
        </a>  
        <a component="$UI/system/components/justep/button/button" class="btn btn-link btn-icon-top"
          label="商城" xid="eshopBtn" icon="linear linear-gift" target="eshopContent">
          <i xid="i7" class="icon linear linear-gift"/>  
          <span xid="span51">商城</span>
        </a>  
  </div>


我希望在 A页面,跳转到上方“商城”页的同时,显示 buttonGroup内容。
A页面跳转 url 地址是什么?应该如何写?
我这样写,总是停留在“新闻”页。
window.location.href =require.toUrl('./index.w#!main//(#!eshopContent)');难道需要modelload里 取 eshopContent 值,再用 content.to ?  能否像纯js写iframe地址一样,直接通过 url 实现


补充:  index_main.w在content中,已经定义了 eshopContent 的src 页面地址。
      <div class="x-contents-content" xid= "eshopContent">
          <div component="$UI/system/components/justep/windowContainer/windowContainer"
            class="x-window-container" xid="mainContainer2" style="height:100%;width:100%;"
            src="./shopindex.w" autoLoad="false"/>
        </div>  





25

主题

57

帖子

233

积分

中级会员

Rank: 3Rank: 3

积分
233
QQ
 楼主| 发表于 2018-3-27 09:35:49 | 显示全部楼层
顶一下
回复

使用道具 举报

发表于 2018-3-27 10:41:32 | 显示全部楼层
http://docs.wex5.com/wex5-ui-question-list-2137/

思路:可以在A页面先调用  index_main.w 里面的contents切换方法,然后再跳转过去(要求第二个页面必须先加载过的)

或者页面跳转的时候,传参过去,index_main.w中接受参数判断一下,再调用contents切换(这个有页面的切换过程,如果不想看到就用第一种方法,先切换再跳转)
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

25

主题

57

帖子

233

积分

中级会员

Rank: 3Rank: 3

积分
233
QQ
 楼主| 发表于 2018-3-27 15:23:49 | 显示全部楼层
已解决,可关闭,谢谢管理
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-28 03:28 , Processed in 0.092883 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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