vue配置手機通過IP訪問電腦開發環境
config/index.js
// Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST
port: 8088, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false,
修改host: '0.0.0.0',errorOverlay: true,
Win10讓局域網內其他電腦通過IP訪問網站的方法
https://www.pconline.com.cn/win10/1126/11261279.html
2、打開控制面板后打開window防火牆。
3、點擊圖中的“高級設置”選項。
4、點擊圖中的“本地計算機上的高級安全 Windows 防火牆”在右側點擊“Windows 防火牆屬性”選項。
5、點擊圖中的“域配置文件--防火牆狀態--入站鏈接”設為”允許“選項 ,如圖:
6、點擊圖中的“專用配置文件,公用配置文件等--防火牆狀態--入站鏈接”設為”允許“選項 ,如圖:
7、這時是否看見“高級設置中的防火牆屬性上方都為允許狀態”,如圖:
8、現在其他局域網內的人可以打開你的網站了