亲测有效! 原博地址:https://blog.csdn.net/w_h_zhang/article/details/120406659 修改vue.config,js文件: module.exports = { devServer: { host: 'localhost' } }