Vue components组件是指一个Vue文件模块可以像一个button,一个div等HTML元素那样内嵌到另一个Vue文件中
写法包括下面几个步骤:
1 实现被当做组件的vue文件 componentA.vue
2 在current.vue中引用componentA.vue
<template>
<div>
<componentA> </componentA>
</div>
</template>
import ComponentA from "@/views/Patient/componentA.vue";
export default {
components: {
ComponentA,
}
..........
}