|
[开发工具]
api.openTabLayout 设置了leftButtons 点返回没反应
[复制链接]
api.openTabLayout 设置了leftButtons 点返回没反应,
页面监听了navbackbtn 也没反应 没监听也不能反悔
- const widgt = 'widget://pages/notices/detail.stml'
- var param = {
- name: 'notices',
- url: widgt,
- bgColor: '#f6f6f6',
- background:"#fff",
- pageParam:{
- 'body':{
- id:item.id,
- type:index
- }
- },
- navigationBar:{
- background:"#fff",
- leftButtons:[{
- iconPath:"widget://images/common/back_b.png",
- scale:2,
- text:"返回",
- color:"#333"
- //(可选项)图片的缩放倍数,默认为 4,数字类型。显示规则:当 scale 值为 3 时,若设备上面期望显示的图标尺寸为 30*25,则图片实际尺寸需要为 90*75。
- }]
- }
- }
- api.openTabLayout(param);
复制代码- api.addEventListener({
- name: 'navbackbtn'
- }, function(ret, err) {
- api.toast({
- msg:'111111'
- })
- // alert('点击了返回按钮');
- api.closeWin();
- });
复制代码
|
|