let eventSource = new EventSource("http.110/110/getMsg")  // 就和new Object 一样 new一个对象  里面的参数就是和后台对接的接口地址。。前缀可以放在main.js里面   
let eventSource = new EventSource("/getMsg")

EventSource 监听后端发送的数据

 

基本就这个难点了吧  上代码

EventSource 监听后端发送的数据

相关文章:

  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-12-01
  • 2021-08-04
猜你喜欢
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案