From fceacc39b70951beb25f7540de02b3a383253a46 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期日, 01 十二月 2019 11:54:30 +0800
Subject: [PATCH] 优化core.js
---
java110-front/src/main/resources/static/js/vc-core.js | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/java110-front/src/main/resources/static/js/vc-core.js b/java110-front/src/main/resources/static/js/vc-core.js
index 616962f..086d569 100644
--- a/java110-front/src/main/resources/static/js/vc-core.js
+++ b/java110-front/src/main/resources/static/js/vc-core.js
@@ -26,20 +26,20 @@
_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 寮傚父锛寁c.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);
}
);
@@ -48,9 +48,9 @@
vc.component.$on(_componentName + '_' + _value,
function (param) {
- // if (vc.debug) {
+ if (vc.debug) {
console.log("鐩戝惉ON浜嬩欢", _componentName, _value, param);
- // }
+ }
_callback(param);
}
);
@@ -69,17 +69,17 @@
_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 寮傚父锛寁c.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;
--
Gitblit v1.8.0