修改项目根目录下的 package.json
"config": { "nuxt": { "host": "0.0.0.0", "port": "3000" } }
这样项目启动后就可以通过ip进行访问了