[Vuejs]-Refs not working in Vue typescript for calling methods in child component

0👍

You should defineExpose in notification component :

<script setup>

 function show(){
       console.log('working');
   }

defineExpose({
  show
})
</script>

or in normal script :

<script lang="ts">
export default{
methods:{
  show(){
       console.log('working');
      }
  },
  expose: ['show'],
}
</script>

Leave a comment