方法一:package.json(适用于vue3) 在文件中找到scripts–serve,在后面添加 --open 方法二:vue.config.js 找到vue.config.js文件,找到devServer,添加下面代码 open:true