diff --git a/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue b/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue index 9b4dacbe..da5196b5 100644 --- a/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue +++ b/apps/web-test/src/views/dashboard/home/components/GridGroup/index.vue @@ -1,10 +1,12 @@ + { emits('editGroupName', props.data.i, cardName.value); }; const { data } = toRefs(props); + +const gridLayoutRef = ref(null); + +setTimeout(() => { + console.log(gridLayoutRef.value); +}, 1000); + +const handleGridLayoutRef = (ref) => { + // 这里可以处理孙组件传递过来的 ref + console.log('子组件 B 收到孙组件的 ref:', ref.value); +}; + +defineExpose({ + childRef: gridLayoutRef.value, +}); @@ -53,7 +68,12 @@ const { data } = toRefs(props); - +