Vue2遇到的打包问题

71 阅读1分钟

怎么生成目录呀/(ㄒoㄒ)/~~

1/打包后本地环境代码中引用的本地图片不显示

vue2中是在config文件中的index中添加assetsPublicPath: './',

image.png

2/打包后的环境使用的element-ui组件中的icon图标不显示

vue2中是在build文件中的utils.js中添加publicPath:'../../' image.png

3/打包后的环境首页面正常展示,点击登录进行页面跳转页面空白

此次解决方案:浏览器F12查看 空白页所请求的资源地址是否正确

正确的请求地址
http://19.192/atorWeb/static/css/app.6e5fe36e65ab3e252fb9f4516488c181.css
错误的请求地址
http://192.168.1.192/atorWeb/dataAdministration/static/css/app.6e5fe36e65ab3e252fb9f4516488c181.css

我是打包后的路由地址中多了/dataAdministration,将其删除就没问题了

高德api报错 Error in mounted hook: “TypeError: AMap.MouseTool is not a constructor“

我的CSDN账号:(90条消息) vue中高德api报错 Error in mounted hook: “TypeError: AMap.MouseTool is not a constructor“_BiangBaing的博客-CSDN博客