vue项目使用本机Ip可以替换localhost访问的设置

方法1.将index.js中的host的值改为‘0.0.0.0’

方法2.修改package.json中script下dev的值,在后面加入--host 0.0.0.0 也可以解决

猜你喜欢

转载自blog.csdn.net/hyupeng1006/article/details/81810545