js兼容写法“”可以判断当前页面是否可见,是否是在后台运行:

hidden(state) {
      if (typeof document.hasFocus !== 'function') {
        return document.hidden
      }
      return !document.hasFocus()
}

 

相关文章:

  • 2022-12-23
  • 2022-03-05
  • 2022-01-20
  • 2021-11-28
  • 2022-01-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-21
  • 2022-12-23
  • 2021-12-04
  • 2022-01-29
  • 2022-01-11
  • 2022-12-23
  • 2022-01-24
相关资源
相似解决方案