Vant是一个面向移动端的组件库,因此默认只适配了移动端设备,这意味着组件只监听了移动端的touch事件,没有监听桌面端的mouse事件。如果需要在桌面端使用Vant,可以引入 @vant/touch-emulator库,这个库会在桌面端自动将mouse事件转换成对应的touch事件,使得组件能够在桌面端使用。

相关文章:

  • 2021-12-16
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-04
  • 2021-08-22
  • 2021-05-17
  • 2022-12-23
  • 2021-07-23
  • 2021-07-28
  • 2022-01-22
相关资源
相似解决方案