父组件

<template>
  {{ temps }}
  <Test title="112131" @temptest="aaa" />
</template>
<script lang="ts" setup>
import { ref } from "@vue/reactivity";
import Test from "./Test.vue";
let temps = ref("adsf");
const aaa = function () {
  temps.value = "456788";
};
</script>

子组件

<template>
  <button @click="bbbb">zzz</button>
</template>

<script lang="ts" setup>
import { defineEmits } from 'vue'
const emit =  defineEmits(['temptest'])
const bbbb = function (aa:string) {
  emit("temptest", aa);
};
</script>