随笔分类 -  uni app (vue3版)

摘要:uniapp的代码,在ios的14.6.0系统下,可能存在执行顺序的问题。函数方法最好按照先声明后调用的方式去实现。 不要这样写 getData() function getData(){ ...... } 最好这样写 function getData(){ ...... } getData() 阅读全文
posted @ 2024-08-30 14:48 huihuihero 阅读(17) 评论(0) 推荐(0) 编辑
摘要:如题,不知道哪个版本开始的。text标签不能用v-html渲染,会失效。 坑的是,官方的uni-notice-bar组件,里面用了标签v-html渲染,所以此组件出现了不渲染文本的问题,所以4.15版本的uni-notice-bar组件不要用 阅读全文
posted @ 2024-06-18 19:50 huihuihero 阅读(17) 评论(0) 推荐(0) 编辑
摘要:问题描述 此组件的获焦和失焦事件,在第一次执行获焦方法后,主动点击失焦。然后再执行获焦方法,会发现本次的获焦方法未生效。流程如下 <uni-easyinput ref="inputElem" v-model="value" /> const inputElem = ref(null) //step1 阅读全文
posted @ 2024-02-22 16:03 huihuihero 阅读(991) 评论(2) 推荐(2) 编辑
摘要:cache.js /** * 存储数据 * key: 缓存的键名,必填 * value: 缓存的值,选填 * * when: 缓存的过期时间,选填: * 【1】传入具体秒数时(单位必须为秒),到期后清除; * 【2】传入单词 forever时,永不清除; * 【3】传入单词 once时,获取一次后清 阅读全文
posted @ 2024-01-25 16:33 huihuihero 阅读(206) 评论(0) 推荐(0) 编辑
摘要:request.js import { rootUrl } from "@/config/app-config.js" import handleCache from '@/utils/cache/cache.js'; import { showToast } from "@/utils/vant" 阅读全文
posted @ 2024-01-25 16:29 huihuihero 阅读(871) 评论(0) 推荐(1) 编辑
摘要:bug描述:hbuildx 3.99版本,ios系统:video高度设置若使用rpx,或者使用浮点px如 200.5 px,则会有控制层不弹出的bug。 解决思路:根据屏幕宽度,以及视频宽高比例,计算出video高度的整数px。见下图 阅读全文
posted @ 2024-01-25 16:26 huihuihero 阅读(160) 评论(0) 推荐(0) 编辑
摘要:问题代码如图 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 阅读(1970) 评论(0) 推荐(0) 编辑
摘要:export function onReload() { let currentPath = getCurrentPages()?.pop()?.$page?.fullPath || '' if (currentPath) { uni.redirectTo({ url: currentPath }) 阅读全文
posted @ 2023-11-28 09:27 huihuihero 阅读(88) 评论(0) 推荐(0) 编辑
摘要:终版:cache.js /** * 存储数据 * key: 缓存的键名,必填 * value: 缓存的值,选填 * * when: 缓存的过期时间,选填: * 【1】传入具体秒数时(单位必须为秒),到期后清除; * 【2】传入单词 forever时,永不清除; * 【3】传其他值或不传值时,App关 阅读全文
posted @ 2023-11-24 15:23 huihuihero 阅读(678) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示