Commit 19ac3f47 by mamingqun

添加vconsole

parent 81a60df0
......@@ -24,6 +24,7 @@
"eslint-plugin-vue": "^5.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"vconsole": "^3.3.4",
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
......
<template>
<div id="app">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/">Home</router-link>|
<router-link to="/about">About</router-link>|
<router-link to="/index">index</router-link>|
<router-link to="/loading">loading</router-link>|
<router-link to="/user">user</router-link>
</div>
<router-view/>
<router-view />
</div>
</template>
<style lang="less">
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
......
......@@ -5,8 +5,19 @@ import store from './store'
Vue.config.productionTip = false
/*
*公共库引用
*/
import vconsole from 'vconsole';
// 打测试包添加vconsole
if (process.env.VUE_APP_BUILD_TYPE && process.env.VUE_APP_BUILD_TYPE === 'test') {
new vconsole()
}
new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
}).$mount('#app')
\ No newline at end of file
......@@ -2,7 +2,8 @@
<div class="home">
<img alt="Vue logo" src="../assets/logo.png" />
<!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
<h1>22{{msg}}</h1>
<h1>home页{{msg}}</h1>
<button @click="testJump">跳转详情</button>
</div>
</template>
......@@ -18,11 +19,16 @@ export default {
}
},
mounted() {
this.msg = process.env.NODE_ENV
console.log( process.env.NODE_ENV )
console.log(process.env.NODE_ENV)
},
methods: {
testJump() {
this.$router.push({ path: 'detail', query: { detailId: 123456 } })
}
},
components: {
HelloWorld
}
......
......@@ -7953,6 +7953,11 @@ vary@~1.1.2:
resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vconsole@^3.3.4:
version "3.3.4"
resolved "https://registry.npm.taobao.org/vconsole/download/vconsole-3.3.4.tgz#a7dacd8887b3d3e902e8d18425cda56c34e77f51"
integrity sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E=
vendors@^1.0.0:
version "1.0.3"
resolved "https://registry.npm.taobao.org/vendors/download/vendors-1.0.3.tgz#a6467781abd366217c050f8202e7e50cc9eef8c0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment