//父级
<father v-model:value="chainType" :options="options" @notify="notify" :supportedOptions="supportedOptions" />
//子
//加update: 把父级的值处理成方法
//与之对应notify 就是走正常的事件传参
const emit = defineEmits(['update:value', 'notify'])
emit('notify', '暂无权限使用该链数据,升级会员后解锁')
emit('update:value', item.value) //使用函数的形式改变父级的value值
vue3 defineEmits ‘update:‘的使用
最新推荐文章于 2024-04-26 13:53:39 发布