组件的使用流程:
1、创建组件(在components中创建你需要的组件)

2、导入组件(将组件导入到我们需要用到组件的文件)

import MyHead from "./components/MyHead.vue";
import MyFoot from "./components/MyFoot.vue";
3、注册组件(在组件使用前,需要将组件注册到需要的地方)
- 局部组件(只能在注册的组件内使用)
在我们要注册的组件内 找到components
在里面注册组件

export default {
components: {
MyHead: MyHead,
MyFoot,
},
};
- 全局组件(所有组件内都能使用)
在main.js文件中import 我们需要注册的全局组件

import HmButton from './components/HmButton'

Vue.component('HmButton', HmButton)
4、使用组件(在组件中的标签语法中直接使用你注册好的组件<MyHead> </MyHead>
)

<template>
<div class="App">
<MyHead> </MyHead>
<div class="two">我是中间盒子</div>
<MyFoot></MyFoot>
</div>
</template>
以上就是组件化开发中 组建的使用流程
创建组件 → 导入组件 → 注册组件 → 使用组件