会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
huihuihero
From zero to hero
博客园
首页
新随笔
联系
订阅
管理
2025年8月11日
xgplayer3播放hls格式的视频,播放出错问题解决
摘要: 现象:hls格式视频调试时,在测试服可以播放,在本地无法播放 原因:xgplayer-hls用到了浏览器的cryptoAPI,这个api使用是有限制的,仅在域名为localhost或者https:的域名下才能生效。否则会报错。 测试服因为是https协议,所以可以播放,本地用了http协议,所以播放
阅读全文
posted @ 2025-08-11 14:36 huihuihero
阅读(57)
评论(0)
推荐(0)
2025年3月27日
关于使用event-source-polyfill单向实时监听接口数据的简单实现
摘要: EventSourcePolyfill 是一个用于在老版本浏览器上模拟Server-Sent Events(SSE)的 polyfill。SSE 是一种允许服务器向客户端推送实时更新的技术。EventSourcePolyfill 通过在不支持原生 EventSource API 的浏览器中提供相
阅读全文
posted @ 2025-03-27 10:49 huihuihero
阅读(605)
评论(0)
推荐(0)
2025年3月4日
一个简单的浏览器页面滚动防抖
摘要: const scrollTimer = ref(null) //滚动防抖定时器 const currentTop = ref(null) //实时滚动高度 const scrollTop = ref(0) //防抖结束后的滚动高度 function bindScrollEvent() { windo
阅读全文
posted @ 2025-03-04 09:05 huihuihero
阅读(19)
评论(0)
推荐(0)
2025年1月17日
js MD5包含中文串时加密结果与JAVA结果不一致的解决方案
摘要: https://www.cnblogs.com/Sandheart/p/12564462.html
阅读全文
posted @ 2025-01-17 13:29 huihuihero
阅读(11)
评论(0)
推荐(0)
2024年9月4日
pinina简单总结
摘要: 定义pinia存储容器 /stores/piniause-demo.js import { defineStore } from 'pinia' /** * 定义并导出容器 * 参数1:容器ID,必须唯一 * 参数2:配置对象 */ export const useDemoStore = defin
阅读全文
posted @ 2024-09-04 09:43 huihuihero
阅读(168)
评论(0)
推荐(0)
2024年8月30日
uniapp在ios14.6.0下存在执行顺序问题,需要注意
摘要: uniapp的代码,在ios的14.6.0系统下,可能存在执行顺序的问题。函数方法最好按照先声明后调用的方式去实现。 不要这样写 getData() function getData(){ ...... } 最好这样写 function getData(){ ...... } getData()
阅读全文
posted @ 2024-08-30 14:48 huihuihero
阅读(38)
评论(0)
推荐(0)
2024年8月16日
nuxt2 优化asyncData 里多个接口await串行请求的弊端,改为并行请求
摘要: 优化前 多个接口await串行请求,若一个接口用时1秒,3个接口一共得用时3秒才行 async asyncData() { let res1 = await danielService.getAllDanielByIndex(); let res2 = await journalService.ge
阅读全文
posted @ 2024-08-16 11:33 huihuihero
阅读(110)
评论(0)
推荐(0)
2024年7月30日
封装一个悬浮按钮拖拽组件(vue2语法)
摘要: 组件代码/components/float-bubble.vue <template> <transition> <div ref="dragArea" class="drag-area" @touchstart.stop="handleTouchStart" @touchmove.prevent.
阅读全文
posted @ 2024-07-30 10:22 huihuihero
阅读(855)
评论(0)
推荐(0)
2024年7月15日
nuxtjs2.x项目PC移动互相跳转
摘要: 1、在plugins目录下新建terminalToggle.js,写入以下代码 (function () { let sUserAgent = navigator.userAgent.toLowerCase(); let isIpad = sUserAgent.match(/ipad/i) == "
阅读全文
posted @ 2024-07-15 09:57 huihuihero
阅读(100)
评论(0)
推荐(0)
2024年7月9日
nuxtjs 2.x.x坑点总结
摘要: 1、项目配置资源管理器不要用yarn,要用npm,不然可能会出问题 2、缩放适配 参考:https://blog.csdn.net/weixin_44599931/article/details/136539941 坑点:不要用postcss-px2rem,会和nuxt引入公共css冲突,改用pos
阅读全文
posted @ 2024-07-09 14:49 huihuihero
阅读(195)
评论(0)
推荐(0)
下一页
公告