Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.

Commit 767b49e

Browse files
committed
修改 - 增加 vConsole 用于移动端调试
1 parent 7b35f7f commit 767b49e

File tree

4 files changed

+6961
-2
lines changed

4 files changed

+6961
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"shelljs": "^0.7.6",
6868
"uglifyjs-webpack-plugin": "^1.1.1",
6969
"url-loader": "^0.5.8",
70+
"vconsole": "^3.2.0",
7071
"vue-loader": "^13.3.0",
7172
"vue-style-loader": "^3.0.1",
7273
"vue-template-compiler": "^2.5.2",

prod.server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// 只适用于 production 环境
12
// 使用方法:根目录下 node prod.server.js
23

34
// webpack-dev-serve 使用 express 作为中间件,故可直接引入

src/main.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ import Vue from 'vue'
44
import App from './App'
55
import router from './router'
66
import store from './store'
7-
import fastclick from 'fastclick'
7+
import fastClick from 'fastclick'
88
import VueLazyLoad from 'vue-lazyload'
99

1010
import 'scss/index.scss'
1111

12-
fastclick.attach(document.body)
12+
// vConsole is only for dev
13+
/* eslint-disable no-unused-vars */
14+
// import VConsole from 'vconsole' // 修改了默认 console,主要用于实现手机端 console
15+
16+
// const vConsole = process.env.NODE_ENV === 'development' ? new VConsole() : null
17+
18+
fastClick.attach(document.body)
1319

1420
Vue.use(VueLazyLoad, {
1521
loading: require('@/common/image/default/default.png')

0 commit comments

Comments
 (0)