会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
huihuihero
From zero to hero
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
29
下一页
2023年12月28日
封装一个表情包组件(支持自定义表情图片)(基于vue3语法)
摘要: 效果图 文件图 直接贴代码 emotion.vue <template> <div class="emotion-container beauty-scroll-livechat"> <div class="emotion-btn" @click="toggleEmotionShow"> <span
阅读全文
posted @ 2023-12-28 16:52 huihuihero
阅读(1133)
评论(0)
推荐(0)
2023年12月20日
uniapp vue3版本的scroll-view的scroll-into-view方法不生效解决
摘要: 问题代码如图 bug原因 建了vue2版本和vue3版本的uniapp分别测试,vue3版本的scroll-view存在scroll-into-view不生效的问题,目前未修复(23.12.20) 已找到解决方法: scroll-view 里需要设置 :scroll-with-animation="
阅读全文
posted @ 2023-12-20 13:30 huihuihero
阅读(2809)
评论(0)
推荐(0)
2023年11月28日
uniapp里实现reload无卡顿刷新
摘要: export function onReload() { let currentPath = getCurrentPages()?.pop()?.$page?.fullPath || '' if (currentPath) { uni.redirectTo({ url: currentPath })
阅读全文
posted @ 2023-11-28 09:27 huihuihero
阅读(223)
评论(0)
推荐(0)
2023年11月24日
uniapp 基于uni.setStorageSync综合封装一个可用于cookie存储和storage存储的方法
摘要: 终版:cache.js /** * 存储数据 * key: 缓存的键名,必填 * value: 缓存的值,选填 * * when: 缓存的过期时间,选填: * 【1】传入具体秒数时(单位必须为秒),到期后清除; * 【2】传入单词 forever时,永不清除; * 【3】传其他值或不传值时,App关
阅读全文
posted @ 2023-11-24 15:23 huihuihero
阅读(796)
评论(0)
推荐(0)
2023年11月22日
uniapp webview页预留顶部安全位置
摘要: onLoad(){ // #ifdef APP-PLUS var height = 0; uni.getSystemInfo({ success: (sysinfo) => { height = sysinfo.windowHeight; }, complete: () => {} }); var
阅读全文
posted @ 2023-11-22 16:41 huihuihero
阅读(443)
评论(0)
推荐(0)
2023年10月9日
网页分步指引插件
摘要: driver.js(推荐) https://driverjs.com/ vue-tour https://pulsardev.github.io/vue-tour/ intro.js https://introjs.com/docs/ 博客:https://blog.csdn.net/weixin_
阅读全文
posted @ 2023-10-09 15:47 huihuihero
阅读(114)
评论(0)
推荐(0)
2023年9月18日
获取视频时长,单位s
摘要: /** * 获取视频时长,单位s * how to use * getVideoDuration('https://xx.xxx.mp4').then(res=>{ * console.log("视频时长",res) * }) */ export function getVideoDuration(
阅读全文
posted @ 2023-09-18 14:34 huihuihero
阅读(122)
评论(0)
推荐(0)
2023年9月4日
PC端项目和移动端项目之间,根据设备类型判断相互跳转
摘要: 移动端项目配置:在index.html里添加以下代码即可 <script> let sUserAgent = navigator.userAgent.toLowerCase(); let isIpad = sUserAgent.match(/ipad/i) == "ipad"; let isIpho
阅读全文
posted @ 2023-09-04 11:05 huihuihero
阅读(196)
评论(0)
推荐(0)
2023年8月30日
基于vue3 封装一个图片裁切功能组件 vue-cropper.js
摘要: 使用的vue-cropper.js,官方文档 https://github.com/xyxiao001/vue-cropper 附图片各格式之间的转换 https://www.cnblogs.com/huihuihero/p/17667325.html 注意:下载vue-cropper.js时,使用
阅读全文
posted @ 2023-08-30 15:21 huihuihero
阅读(1551)
评论(0)
推荐(0)
图片各格式之间的相互转换
摘要: ##贴代码imgformat-deal.js ``` /** * 图片file格式转为base64 * fileToBase64(file).then((res) => {console.log(res.data)}) */ export function fileToBase64(file) {
阅读全文
posted @ 2023-08-30 15:07 huihuihero
阅读(120)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
29
下一页
公告