On click ion button ionic 6.18.1 vue

Hi, this is my code.

    <ion-header translucent>
    <ion-content fullscreen>
      <ion-header collapse="condense">
          <ion-title size="large">Blank</ion-title>
      <div id="container">
        <ion-button shape="round" color="primary">Test</ion-button>


<script lang="ts">
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonButton } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
  components: {

<style scoped>
#container {
  text-align: center;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

#container strong {
  font-size: 20px;
  line-height: 26px;

#container p {
  font-size: 16px;
  line-height: 22px;
  color: #8c8c8c;
  margin: 0;

#container a {
  text-decoration: none;

How i can call a function on the ion button click? I searched online but all the reply are for the old version.
Sorry for my english.

See this example: topv3/Home.vue at fa5196450f47f52a5335886ab3761a930811e5d0 · dolthead/topv3 · GitHub

  1. Add @click="functionName" or @click="functionName(param)" to your button
  2. Put your functions in a setup() function under components:
  3. return your function names from the setup() function

And your English is very clear!