会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
huihuihero
From zero to hero
博客园
首页
新随笔
联系
订阅
管理
2025年3月27日
关于使用event-source-polyfill单向实时监听接口数据的简单实现
摘要: EventSourcePolyfill 是一个用于在老版本浏览器上模拟Server-Sent Events(SSE)的 polyfill。SSE 是一种允许服务器向客户端推送实时更新的技术。EventSourcePolyfill 通过在不支持原生 EventSource API 的浏览器中提供相
阅读全文
posted @ 2025-03-27 10:49 huihuihero
阅读(110)
评论(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
阅读(5)
评论(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
阅读(115)
评论(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
阅读(23)
评论(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
阅读(76)
评论(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
阅读(620)
评论(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
阅读(68)
评论(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
阅读(96)
评论(0)
推荐(0)
2024年6月25日
解决i18n打包上线后,i18n插槽语法失效问题
摘要: 以下方式仅适用于vue3+webpack vue3+vite环境有相似问题网上可以搜到,如下 https://blog.csdn.net/qq_40606563/article/details/132293376 https://blog.csdn.net/krico233/article/deta
阅读全文
posted @ 2024-06-25 16:04 huihuihero
阅读(329)
评论(0)
推荐(0)
2024年6月18日
HbuilderX 4.xx版本 <text>标签不能用v-html渲染,会失效
摘要: 如题,不知道哪个版本开始的。text标签不能用v-html渲染,会失效。 坑的是,官方的uni-notice-bar组件,里面用了标签v-html渲染,所以此组件出现了不渲染文本的问题,所以4.15版本的uni-notice-bar组件不要用
阅读全文
posted @ 2024-06-18 19:50 huihuihero
阅读(21)
评论(0)
推荐(0)
下一页
公告