1.在当前项目安装依赖
npm install --save-dev cross-env
2.修改package.json ip为自己电脑的地址
"scripts": { "dev": "cross-env NUXT_HOST=192.168.1.192 NUXT_PORT=3000 nuxt", }