android平臺 weex sdk 0.10.0tabbar是在 instanceId =1 在當前實例很簡單,在其他 instance時候,如何切回 tabbar的某一項,沒有對應方法??次臋n,我的思路是 BroadcastChannel在不同實例通訊完成const broadCastChannel = new BroadcastChannel('tab');
//bind message handler
broadCastChannel.onmessage = function (event) {
console.log(event.data);
}其他實例 調用下面方法 postMessagevar tabChannel;function tab(url){
tabChannel = new BroadcastChannel('tab');
tabChannel.postMessage(url);
tabChannel.close();
tabChannel = null;
}真機運行,以為可以解決了,實際運行 BroadcastChannel is not defined,那就是 js框架不支持BroadcastChannel ,不知道怎么弄了,有朋友有解決方法嗎?在其他實例,切回 tabbar的某一項,思路2:js getInstance 獲取到 instanceId=1 這個實例,不知道這個思路是否可行,js 有無 getInstace 方法
Weex 導航到選中 tabbar item 擴展方法
慕田峪9158850
2018-10-09 19:27:57