input 在组件插槽内使用时,事件无法触发
342 浏览2023年03月24日作者:test_dev_fkw_com

index 页面中使用了 <cell-item /> 组件,插槽内容使用了原生 <input />,bindinput 事件没有触发,我将 <input /> 组件封装成 <custom-input /> 后,bindinput 事件正常了,具体内容可以看代码片段


初步排查原因为,插槽内的 <input /> 组件触发 bindinput 事件时,this 上下文指向了 <cell-item /> 组件导致的:

最后一次编辑于 2023 年 03 月 27 日
0 条评论

相关文章

专题推荐

热门文章

热门问答