摘要: ‌EventSourcePolyfill‌ 是一个用于在老版本浏览器上模拟Server-Sent Events(SSE)的 polyfill。SSE 是一种允许服务器向客户端推送实时更新的技术。EventSourcePolyfill 通过在不支持原生 EventSource API 的浏览器中提供相 阅读全文
posted @ 2025-03-27 10:49 huihuihero 阅读(110) 评论(0) 推荐(0)
摘要: 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)
摘要: 定义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)
摘要: uniapp的代码,在ios的14.6.0系统下,可能存在执行顺序的问题。函数方法最好按照先声明后调用的方式去实现。 不要这样写 getData() function getData(){ ...... } 最好这样写 function getData(){ ...... } getData() 阅读全文
posted @ 2024-08-30 14:48 huihuihero 阅读(23) 评论(0) 推荐(0)
摘要: 优化前 多个接口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)
摘要: 组件代码/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)
摘要: 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)
摘要: 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)
摘要: 以下方式仅适用于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)
摘要: 如题,不知道哪个版本开始的。text标签不能用v-html渲染,会失效。 坑的是,官方的uni-notice-bar组件,里面用了标签v-html渲染,所以此组件出现了不渲染文本的问题,所以4.15版本的uni-notice-bar组件不要用 阅读全文
posted @ 2024-06-18 19:50 huihuihero 阅读(21) 评论(0) 推荐(0)