lyh published on 应用场景:当切换路由页面,取消正在请求的接口 1.请求拦截器 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // axios.js window._axiosPromiseArr = [] // axios中设置放置要取消的对象 // 请求拦
lyh published on 以下是创建第一篇文章的方法: hugo new posts/first_post.md 注意 默认情况下, 所有文章和页面均作为草稿创建. 如果想要渲染这些页面, 请从元数据中删除属性 draft: true, 设置属性 draft: false 在
lyh published on 一直以来移动端的项目都有一种优化上的需求,那就是前进页面拿最新的数据,后退页面即缓存页面。 总体思路 1.在 vue 方法里 keep-alive 的 include 设置需要缓存页面的 name 可
lyh published on 原理:利用canvas来实现,将图片绘制到canvas上,然后canvas转图片时,微信提供的一个方法wx.canvasToTempFile
lyh published on 1.下载nvm github最新版本下载: https://github.com/coreybutler/nvm-windows/releases 2.nvm的使用方法 1.安装最新版node: nvm install latest 2.安装指定版本node: nvm install 14.15.0 3.查看已安装的
lyh published on 项目上有个需求,需要缓存已打开的页面,同时关闭 tab 的时候清除缓存。 总体思路 1.在 vue 方法里keep-alive的include设置需要缓存页面的