uni-app打包成h5,路径改为相对路径,在开发阶段,可以在devServer中配置代理

可以支持 在mainfest.json中设置h5节点的publicPath为:'./'打包后即为相对路径 但是你会发现一个问题就是有tabbar的情况下你的图标找不到 这是你需要手动改打包后的index.xxxxx.js文件 把这个e.uniConfig.router={mode:"hash",base:"/"}改成e.uniConfig.router={mode:"hash",base:"./"}

uni-app中关于图片懒加载

http://ask.dcloud.net.cn/article/35759

猜你喜欢

转载自blog.csdn.net/memedadexixaofeifei/article/details/93722294
今日推荐