Merge branch 'xuebaoxin' of pplokijuhyg/falvpingtai into master

This commit is contained in:
pplokijuhyg 2019-11-25 08:43:50 +08:00
commit cacc806219
5 changed files with 26 additions and 14 deletions

View File

@ -9,7 +9,8 @@
}, },
"dependencies": { "dependencies": {
"core-js": "^3.3.2", "core-js": "^3.3.2",
"vue": "^2.6.10" "vue": "^2.6.10",
"vue-router": "^3.1.3"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.0.0", "@vue/cli-plugin-babel": "^4.0.0",

View File

@ -1,28 +1,18 @@
<template> <template>
<div id="app"> <div id="app">
<img alt="Vue logo" src="./assets/logo.png"> <router-view></router-view>
<HelloWorld msg="Welcome to Your Vue.js App"/>
</div> </div>
</template> </template>
<script> <script>
import HelloWorld from './components/HelloWorld.vue'
export default { export default {
name: 'app', name: 'app',
components: { components: {
HelloWorld
} }
} }
</script> </script>
<style> <style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style> </style>

View File

@ -1,8 +1,9 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import router from "./router"
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router
}).$mount('#app') }).$mount('#app')

15
src/router.js Normal file
View File

@ -0,0 +1,15 @@
import Vue from 'vue'
//1.导入路由组件vue-router
import Router from 'vue-router'
//2.调用vue-router
Vue.use(Router)
const router=new Router({
routes: [
// {
// path: '/',
// component: Hello
// }
]
});
export default route;

View File

@ -7938,6 +7938,11 @@ vue-loader@^15.7.0:
vue-hot-reload-api "^2.3.0" vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0" vue-style-loader "^4.1.0"
vue-router@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.1.3.tgz#e6b14fabc0c0ee9fda0e2cbbda74b350e28e412b"
integrity sha512-8iSa4mGNXBjyuSZFCCO4fiKfvzqk+mhL0lnKuGcQtO1eoj8nq3CmbEG8FwK5QqoqwDgsjsf1GDuisDX4cdb/aQ==
vue-style-loader@^4.1.0: vue-style-loader@^4.1.0:
version "4.1.2" version "4.1.2"
resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8" resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"