vue 获取dom节点

<input ref="aaa",></input>

获取当前input 可以使用以下两种方案

this.$refs.aaa 
document.getElementById('aaa')

refs这种方式会减少消耗

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2021-12-23
  • 2022-12-23
  • 2021-07-11
猜你喜欢
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-07-31
  • 2021-08-28
相关资源
相似解决方案