两个prubliceglobalmessage((事件在代码中提到的附加点时不起作用。发布事件不首次单击。两个PublishGlobalMessage((的代码仅在第二次点击时工作。清除了缓存并再次尝试,但仍未找到解决方案。
代码段为: -
on(this._attachpTName", "click", lang.hitch(this.function(){
this._handleClick("targetpage",{page:hash().split(:)[0]}};
_handleClick:function(targetPage,props){
this.publishGlobalMessage("navigate",targetPage,props);
this.publishGlobalMessage("risk/level/selected",icon.riskLevel);
}
请建议应该做什么。
parent js文件中的模块的明确包含。它解决了Dojo中的明确发布订阅问题。快速修复,这使我解决了这个问题。