- 博客(16)
- 收藏
- 关注
原创 vue-router禁止访问某个页面时,点击浏览器回退按钮还是能访问到
有时候为了不让某些用户访问某些页面(即权限控制),可能会使用next(false)中断其访问,或者跳转到404页面,这时候如果点击浏览器“倒退”按钮其实还是能访问到,因为保留了历史访问记录,所以在跳转的时候需要处理一下,使其不保留历史访问记录1.使用next(false)时,可以在其前面一行加上this.$router.go(-1)this.$router.go(-1)next(fal...
2019-02-27 14:32:37 3599
转载 vue设置404页面
在router/index.js中添加{path: "/404",name: "notFound",component: notFound}, {path: "*", // 此处需特别注意置于最底部redirect: "/404"}转自:https://blog.csdn.net/przlovecsdn/article/details/81509843...
2019-02-27 14:20:29 3307
转载 ES6 操作数组的并集/交集/差集
转自:https://blog.csdn.net/hobbithero/article/details/77891323let a = new Set([1, 2, 3]);let b = new Set([3, 5, 2]); // 并集let unionSet = new Set([...a, ...b]);//{1,2,3,5}// 交集let intersectio...
2019-02-27 11:58:52 868
转载 axios如何获取后端接口返回的状态码以及相关信息
axios如何获取后端接口返回的状态码以及相关信息axios的github:https://github.com/axios/axios
2019-02-27 11:53:35 6062
转载 原生js获取cookie值
转自:https://www.cnblogs.com/liuwt365/p/6831590.htmlfunction getCookie(name){ var strcookie = document.cookie;//获取cookie字符串 var arrcookie = strcookie.split("; ");//分割 //遍历匹配 for ( var...
2019-02-22 17:14:16 681
转载 vue-cli+iview打包后iview自带的字体图标找不到的解决办法
转自:https://blog.csdn.net/lhjuejiang/article/details/84785879使用iview做项目的时候,打包上传到服务器后,iview中自带的字体图标显示不出来,百度了很多方法,下面的方法可靠哦更改 build/utils.js 文件中 ExtractTextPlugin 插件的options 配置:添加 publicPath: '../.....
2019-02-20 15:57:33 296
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人