vue3对象里包含组件 组件点语法
作者:互联网
```javascript
<template>
<div>
<!-- <input type="text" v-bind="$attrs">-->
<data.com></data.com>
<button @click="btnClickHanlder">按钮</button>
</div>
</template>
<script>
export default {
name: "inputData",
inheritAttrs : false
}
</script>
<script setup>
import { reactive } from "vue"
//一个组件
import MyComponent from "../template/index.vue"
function btnClickHanlder(){
alert("嘿嘿")
}
let data =reactive({
name : "mafeilong",
age : 18,
com : MyComponent
})
</script>
#MyComponent 内容
<template>
<div>
<h1>这是对象引用的模板</h1>
</div>
</template>
标签:vue,name,vue3,语法,reactive,MyComponent,组件,import 来源: https://blog.csdn.net/qq_42935297/article/details/120566494