:ref="(el)=>setItemRef(el, 'test'+1)"
const iframeRefs = {}
const setItemRef = (el, key) => {
  if (el) {
    iframeRefs[key] = el
  }
}

onMounted(()=>{
  const iframeKey = 'test1'
  const iframe = iframeRefs[iframeKey]
  console.log(iframe)
})

 

Logo

前往低代码交流专区

更多推荐