| | |
| | | _componentName = arguments[1]; |
| | | _value = arguments[2]; |
| | | _callback = arguments[3]; |
| | | }else if(arguments.length == 3){ |
| | | } else if (arguments.length == 3) { |
| | | _componentName = arguments[0]; |
| | | _value = arguments[1]; |
| | | _callback = arguments[2]; |
| | | }else{ |
| | | } else { |
| | | console.error("执行on 异常,vc.on 参数只能是3个 或4个"); |
| | | return; |
| | | } |
| | | if (vc.notNull(_namespace)) { |
| | | vc.component.$on(_namespace + "_" + _componentName + '_' + _value, |
| | | function (param) { |
| | | //if (vc.debug) { |
| | | if (vc.debug) { |
| | | console.log("监听ON事件", _namespace, _componentName, _value, param); |
| | | // } |
| | | } |
| | | _callback(param); |
| | | } |
| | | ); |
| | |
| | | |
| | | vc.component.$on(_componentName + '_' + _value, |
| | | function (param) { |
| | | // if (vc.debug) { |
| | | if (vc.debug) { |
| | | console.log("监听ON事件", _componentName, _value, param); |
| | | // } |
| | | } |
| | | _callback(param); |
| | | } |
| | | ); |
| | |
| | | _componentName = arguments[1]; |
| | | _value = arguments[2]; |
| | | _param = arguments[3]; |
| | | }else if(arguments.length == 3){ |
| | | } else if (arguments.length == 3) { |
| | | _componentName = arguments[0]; |
| | | _value = arguments[1]; |
| | | _param = arguments[2]; |
| | | }else{ |
| | | } else { |
| | | console.error("执行on 异常,vc.on 参数只能是3个 或4个"); |
| | | return; |
| | | } |
| | | //if (vc.debug) { |
| | | console.log("监听emit事件", _componentName, _value, _param); |
| | | //} |
| | | if (vc.debug) { |
| | | console.log("监听emit事件", _namespace, _componentName, _value, _param); |
| | | } |
| | | if (vc.notNull(_namespace)) { |
| | | vc.component.$emit(_namespace + "_" + _componentName + '_' + _value, _param); |
| | | return; |