Browse Source

加入vconsole

zaijin 2 years ago
parent
commit
5938fbd8a5
2 changed files with 6 additions and 0 deletions
  1. 5 0
      main.js
  2. 1 0
      package.json

+ 5 - 0
main.js

@@ -5,6 +5,11 @@ Vue.config.productionTip = false;
 import { config } from './common/config';
 Vue.prototype.config = config;
 
+if (process.env.H_NODE_ENV !== 'production') {
+	const vconsole = require('vconsole')
+	Vue.prototype.$vconsole = new vconsole()
+}
+
 import './utils/filter';
 
 App.mpType = 'app';

+ 1 - 0
package.json

@@ -24,6 +24,7 @@
     }
   },
   "dependencies": {
+    "vconsole": "^3.15.0",
     "vue-jsonp": "^2.0.0",
     "weixin-js-sdk": "^1.6.0"
   }