用的是element admin 的模板,需要修改绝对路径为相对路径 修改vue.config.js
publicPath: './', //改成这样 outputDir: 'dist', assetsDir: './static', //改成这样