发布于 4年前

js 检查是否是浏览器环境

// 检验是否浏览器环境
try {
    document
} catch (err) {
    throw new Error('请在浏览器环境下运行')
} 
©2020 edoou.com   京ICP备16001874号-3