摘要: css js 通过滚动监听实现搜索框淡入淡出效果实现 关键点 动画效果 通过给元素添加active的class去匹配 .search.active 的样式类 .search.active ,在搜索框出现的时候,给它添加active,消失时移除 .search{ width: 80%; padding 阅读全文
posted @ 2022-10-25 16:20 STR少寒 阅读(175) 评论(0) 推荐(0) 编辑
摘要: vuepress 运行报错 Vue packages version mismatch: D:\vuepress-test>npm run docs:dev npm WARN config global `--global`, `--local` are deprecated. Use `--loc 阅读全文
posted @ 2022-10-13 10:18 STR少寒 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 支付宝小程序 Session会话保持 小程序是否支持 cookie 和 session? 官方给出的答案:小程序不支持使用 cookie,不支持 session。推荐使用小程序缓存。 但是在my.request 的常见问题中有发现如下question 小程序是否支持 cookie? A:小程序针对服 阅读全文
posted @ 2022-09-29 15:09 STR少寒 阅读(572) 评论(0) 推荐(0) 编辑
摘要: uniapp webview h5 通信 window.postMessage 方式 父页面 <template> <view> <!-- <web-view :webview-styles="webviewStyles" src="https://uniapp.dcloud.io/static/w 阅读全文
posted @ 2022-09-27 11:38 STR少寒 阅读(2209) 评论(0) 推荐(0) 编辑
摘要: vue axios 封装解析 示例代码 http.js import axios from "axios"; //创建axios实例 const service = axios.create({ baseURL: 'https://some-domain.com/api/', timeout: 50 阅读全文
posted @ 2022-08-15 16:10 STR少寒 阅读(242) 评论(0) 推荐(0) 编辑
摘要: npm 发布和下载包 1. 使用npm注册的账号进行登录 npm login 2. 登录成功后,查看当前用户 npm whoami 3. 初始化项目的文件夹 npm init 初始化完成后,文件夹中会多出一个package.json 文件 4. 推送要发布的包到 npm 上 npm publish 阅读全文
posted @ 2022-06-16 17:48 STR少寒 阅读(162) 评论(0) 推荐(0) 编辑
摘要: windows .exe 文件默认打开方式变成记事本的解决方法 如果cmd.exe打不开,先将默认打开方式切换成cmd.exe 如果用户选择了默认的模式,会在注册表中写一个UserChoice的注册信息,优先级会高一些 OpenWithList //可打开方式列表越往上应该越高 OpenWithPr 阅读全文
posted @ 2022-06-15 16:11 STR少寒 阅读(1646) 评论(0) 推荐(0) 编辑
摘要: uniapp 图片文件选择、上传、预览、删除 <template> <view> <view> </view> <view v-for="(item,index) in imgList"> <view style="margin: 20rpx;position: relative;"> <image 阅读全文
posted @ 2022-06-10 14:50 STR少寒 阅读(2694) 评论(0) 推荐(0) 编辑
摘要: 微信小程序 按物理返回键返回指定页面 跳转多个页面后,按返回指定的页面解决方案 实现思路 在页面进行返回时会将页面进行销毁,并调用onUnload函数 可以在onUnload函数中调用wx.reLaunch 方法,关闭其他的页面,跳转带菜单页(我的需求是这样) 实际测试中的问题 设置的返回跳转的ur 阅读全文
posted @ 2022-05-12 17:36 STR少寒 阅读(853) 评论(0) 推荐(0) 编辑
摘要: JS async/await 不能阻塞返回 非Promise对象 测试代码1 async function fn1(){ console.log(1); await pr1(); await pr2(); console.log(2); }; function fn2(){ console.log( 阅读全文
posted @ 2022-04-27 16:01 STR少寒 阅读(156) 评论(0) 推荐(0) 编辑