子组件
<template>
<div>
<button @click="testEmit">我是子组件</button>
<br>
{
{
msg}}
</div>
</template>
<script lang="ts">
import {
defineComponent} from 'vue';
export default defineComponent
子组件
<template>
<div>
<button @click="testEmit">我是子组件</button>
<br>
{
{
msg}}
</div>
</template>
<script lang="ts">
import {
defineComponent} from 'vue';
export default defineComponent