摘要: 定义pinia存储容器 /stores/piniause-demo.js /** * 定义并导出容器 * 参数1:容器ID,必须唯一 * 参数2:配置对象 */ export const useDemoStore = defineStore('demo', { //state:类似组件data,用于 阅读全文
posted @ 2024-09-04 09:43 huihuihero 阅读(12) 评论(0) 推荐(0) 编辑
摘要: uniapp的代码,在ios的14.6.0系统下,可能存在执行顺序的问题。函数方法最好按照先声明后调用的方式去实现。 不要这样写 getData() function getData(){ ...... } 最好这样写 function getData(){ ...... } getData() 阅读全文
posted @ 2024-08-30 14:48 huihuihero 阅读(5) 评论(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 阅读(16) 评论(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 阅读(153) 评论(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 阅读(17) 评论(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 阅读(35) 评论(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 阅读(58) 评论(0) 推荐(0) 编辑
摘要: 如题,不知道哪个版本开始的。text标签不能用v-html渲染,会失效。 坑的是,官方的uni-notice-bar组件,里面用了标签v-html渲染,所以此组件出现了不渲染文本的问题,所以4.15版本的uni-notice-bar组件不要用 阅读全文
posted @ 2024-06-18 19:50 huihuihero 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 参考方法 https://blog.csdn.net/sun12356499514452248/article/details/128518711 组件代码 <template> <div class="ks-audio"> <div class="audio-wrapper"> <van-slid 阅读全文
posted @ 2024-05-29 10:15 huihuihero 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://better-scroll.github.io/docs/zh-CN/guide 阅读全文
posted @ 2024-02-28 10:38 huihuihero 阅读(7) 评论(0) 推荐(0) 编辑