vue3.0通过ref获取模板中的dom/组件步骤

101 阅读1分钟

1.声明空对象

2.return 空对象

3.ref='空对象名

4.onMounted(()=>{ console.log(对象.value)}