1、在css中使用background引入static目录下的图片时,需使用相对路径
例:background: url("../../../static/img/1.png");
2、build ---> utils.js 添加代码 publicPath:'../../'
3、config ---> index.js
assetsPublicPath:"/" 修改为 assetsPublicPath:"./"
1、在css中使用background引入static目录下的图片时,需使用相对路径
例:background: url("../../../static/img/1.png");
2、build ---> utils.js 添加代码 publicPath:'../../'
3、config ---> index.js
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。