jsx-vue2
jsx-vue2 copied to clipboard
无法在vue2.7的中使用ref获取dom,以及组件实例。


如果需要手动赋值 ref 的话,使用函数的形式赋值
<SwitchSettingCommonModal ref="(el)=>{modalRef.value = el}" />
如果需要手动赋值 ref 的话,使用函数的形式赋值
<SwitchSettingCommonModal ref="(el)=>{modalRef.value = el}" />
可行的, 不过实例代码应该是这样<SwitchSettingCommonModal ref={el=>(modalRef.value = el)} />