2***@qq.com
2***@qq.com
  • 发布:2018-01-13 16:28
  • 更新:2018-01-13 18:24
  • 阅读:1506

mui.openWindowWithTitle后getTitleNView为空

分类:MUI

HBuilder 8.9.1.201712121728
android下,通过mui.openWindowWithTitle打开页面后,通过plus.webview.currentWebview().getTitleNView(),返回值是null。

换成plus.webview.create并显示页面后,plus.webview.currentWebview().getTitleNView()可获得标题栏对象。

这是bug,还是怎地?

2018-01-13 16:28 负责人:无 分享
已邀请:

最佳回复

BoredApe

BoredApe - 有问题就会有答案。

此方法不推荐使用,用 ==》mui.openWindow
可通过在mui.openWindow options的styles节点传入titleNView相关参数设置替代此方法,具体设置参考mui.openWindow的文档http://dev.dcloud.net.cn/mui/window/#titleNView

openWindowWithTitle是mui前端创建的nativeObj
而getTitleNView()获取的是5+创建的nativeObj,控制台打印下这个方法就可以看到了
plus.webview.currentWebview().getTitleNView

   var n=this.__uuid__;if(t=e.nativeObj.View.getViewById(n))

getViewById() 写死了 获取的是页面 uuid

该问题目前已经被锁定, 无法添加新回复