判断是服务端还是客户端

一般操作dom的方法:

if (process.browser) {
 console.log('此处操作dom')
}

相关文章:

  • 2022-01-18
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2021-12-28
  • 2021-06-24
  • 2021-10-27
相关资源
相似解决方案