components
<template>
<div>
<div class="two-com">
123
</div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
.two-com{
background-color: orange;
color: #fff;
padding: 10px;
border-radius: 4px;
}
</style>
App.vue
<template>
<div>
<!-- 使用组件 -->
<two-com/>
</div>
</template>
<script>
// 引入组件
import TwoCom from "./components/TwoCom.vue"
export default {
// 注册组件
components:{TwoCom}
}
</script>
<style lang="scss" scoped>
</style>