shiyakami Merhaba kodu denedim bende calisiyor

HelloWorld.vue
<template>
<div class="hello">
<button @click="this.$emit('hello')"> Tikla </button>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
emits: ["merhaba"],
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
sizin gibi setup içinde gönderincede çalışıyor. Başka biryerde hata yapıyorsunuz
<template>
<div class="hello">
<button @click="this.$emit('hello')"> Tikla </button>
</div>
</template>
<script setup>
import { defineEmits } from "vue"
defineEmits(["hello"])
</script>
app.vue
<template>
<img alt="Vue logo" src="./assets/logo.png">
<HelloWorld @hello="SayHello"/>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue'
export default {
name: 'App',
components: {
HelloWorld
},
methods: {
SayHello() {
alert('merhaba')
}
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>