如何在 VueJS 3 中的组件外部发出事件?

问题描述 投票:0回答:1
vue.js vuejs3 quasar-framework
1个回答
0
投票

在组合 API 中:

<script setup>

const $emit = defineEmits(['refreshList']);

//later in code

$emit('refreshList');

</script>
© www.soinside.com 2019 - 2024. All rights reserved.