bug: vue3.2.29通过v-for显示component组件通过ref调用子组件方法时提示子组件方法为undefined
zwyao314 opened this issue · 0 comments
zwyao314 commented
代码:
<template #tab>
{{ tab.title }}
{{ tab.title }}
{{ tab.title }}
{{ tab.title }}
this.tabs.forEach(tab => {
let formRef = this.$refs[tab.key];
if (tab.isForm) {
let formValidator = formRef.validateForm(); // 该子组件的方法为undefined
}
});