![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
安静的小女子
这个作者很懒,什么都没留下…
展开
-
vue-router路由参数刷新消失的问题
vue-router路由参数刷新消失的问题页面使用vue-router在跳转时发的参数有用来给下一个页面请求数据用的。在进入页面后再次刷新,参数就消失了,解决方案如下: 1、如果要用 params 传参的话,可能需要在你的路由路径里也加上这个参数,比如你用this.$router.push({name:'articleDetail, params:{articleId: arti...原创 2018-04-11 12:05:59 · 14496 阅读 · 4 评论 -
vue build 后放到服务器上,打开index.html 页面空白,报错资源找不到
解决办法:config–>index.js–>build:{….,assetsPublicPath: ‘./’,},加个‘.’就好了 如下图所示原创 2018-04-19 18:29:49 · 2936 阅读 · 1 评论 -
vue项目生成二维码功能使用QRCode
1,导入第三方插件npm install –save qrcode2,在页面上引入import QRCode from 'qrcodejs2' <div id="qrcode">二维码位置</div> methods: { qrcode () { let qrcode = new QRCode('qrcode',...转载 2018-05-12 17:37:44 · 25289 阅读 · 12 评论 -
小程序返回上一页部分接口刷新的问题
若从A页面跳到B页面(A—>B),在B页面操作完成后需要刷新A页面的数据,有两种思路:(推荐使用第2种方法)1.在返回A页面的时候调用A的页面onShow()方法,重新查询加载一次A页面即可,代码为:onShow: function () { this.onLoad();},这种方法返回A页面时需要重新加载页面,太慢,太Low!!2.这种方法是极力推荐的:在B页面中进行操作的...原创 2018-12-28 14:59:35 · 2525 阅读 · 2 评论 -
npm run build 时出错了
问:npm run build 时报如下错误:Getting this when trying to use this plugin: 91% additional asset processing/Users/bradennapier/Desktop/Dash OS/IDE/projects/dash-desktop/node_modules/uglifyjs-webpack-plugin/...原创 2019-01-08 15:14:59 · 4076 阅读 · 0 评论 -
vue动态修改路由的query参数
vue动态修改路由的query参数1、安装npm 依赖npm i webpack-merge2、写入代码import merge from 'webpack-merge';修改原有参数this.$router.push({ query:merge(this.$route.query,{'maxPrice':'630'})})新增一个参数:this.$router.p...原创 2019-05-08 18:47:43 · 18219 阅读 · 1 评论 -
vue 项目在ie浏览器的兼容问题
不兼容是因为对es6不支持一、关于babel-polyfill1、说明:This will emulate a full ES2015+ environment and is intended to be used in an application rather than a library/tool. This polyfill is automatically loaded when u...原创 2019-06-26 19:04:03 · 59215 阅读 · 17 评论