实现单文件组件的拼搭
1、在component下新建test1.vue和Helloworld.vue
2、在app.vue中import和export
<template>
<div id="app">
<img src="./assets/logo.png">
<HelloWorld></HelloWorld>
<test1></test1>
</div>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
import test1 from './components/test1.vue'
export default {
components:{
HelloWorld,test1
},
name: 'App'
}
</script>
<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>
以标签的形式添加