【分享】EAS8.0 WEB页面扩展开发中如何扩展前台js事件和action
1,465次浏览
编辑于2015年07月15日 13:24:21
在扩展页面生成的js文件中,会默认存在两个区域Public(//@beginPublic与//@endPublic之间)和Private(//@beginPrivate与//@endPrivate之间),扩展的事件只能写在Private区域中:
1、在waf.extend(_private,{})中增加一个方法:xxxx:function(){};
2、在waf.extend(_private,{})与//@endPrivate之间加入:_self.subscribeEvent("xxActionEvent",_private.xxxx,"before/overwrite/after");
1、在waf.extend(_private,{})中增加一个方法:xxxx:function(){};
2、在waf.extend(_private,{})与//@endPrivate之间加入:_self.subscribeEvent("xxActionEvent",_private.xxxx,"before/overwrite/after");
推荐阅读