
uniapp
程序猿吉良吉影
我只想安静的写写代码、
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uni 鼠标 移入移出事件监听
有个鼠标移入触发需求,翻了半天官方文档没有发现有对应介绍,然后搜到touchstart、@touchmove、@touchend移入移出事件,弄了半天发现并没有效果。然后又去问答社区看了下 发现这是手机端触发的 pc无效。原创 2023-12-27 12:35:28 · 1306 阅读 · 0 评论 -
uni 禁用浏览器右键菜单事件
想做一个右击出现工具条功能浏览器默认右击会出现字段的操作条1、禁用浏览器右击事件2、然后使用@contextmenu 和@click.right都行3、el-popover实现菜单相对位置布局。原创 2023-03-31 14:36:40 · 869 阅读 · 0 评论 -
uni状态管理pinpia
uni-app 内置了Pinia。使用HBuilder X不需要手动安装,直接使用即可。使用CLI需要手动安装,执行或。Vue 2 项目暂不支持。原创 2023-03-28 09:17:53 · 855 阅读 · 0 评论 -
微信小程序解码emoji表情
// 解码emoji表情 uncodeUtf16(str) { var reg = /\&#.*?;/g; var result = str.replace(reg, function(char) { var H, L, code; if (char.length == 9) { cod...原创 2022-04-24 19:10:09 · 2453 阅读 · 0 评论 -
小程序ios margin-bottom失效问题
使用:padding-bottom 可兼容原因:从IOS8开始,属性var layoutMargins:UIEdgeInsets指定该View的subview同其edge的间距。AutoLayout使用margins来放置内容。其默认值为8pt。如果一个View是ViewController的rootview,系统会自动设置和管理margins,top和bottom。margins为0pt。所以自己设定的margin-bottom会失效...原创 2022-04-24 18:59:00 · 1046 阅读 · 0 评论 -
小程序体验版无法访问网络request:fail -2:net::ERR_FAILED
开发者工具浏览器访问都是正常然后【SSL/TLS安全评估报告】测试域名信任链是否完整。https://myssl.com/证书链下载修复工具证书链下载/证书链修复证书链下载/证书链修复工具,通过域名或者ip,或者证书信息,查看完整的证书链信息。https://myssl.com/chain_download.html...原创 2022-02-11 14:15:18 · 9618 阅读 · 0 评论 -
npm install 依赖冲突问题
npm install 报错依赖版本不一致安装时忽略所有peerDependenciesnpm install xxxx --legacy-peer-deps错误信息:npm ERR! Found: [email protected] ERR! node_modules/eslintnpm ERR! dev eslint@"7.32.0" from the root projectnpm ERR!npm ERR! Could not resolve dependency:npm E..原创 2021-12-17 22:42:43 · 5945 阅读 · 0 评论 -
uni 获取设备唯一标识
tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}原创 2021-09-01 10:12:07 · 3352 阅读 · 0 评论 -
uni Android版本号判断
// #ifdef APP-PLUS var Build = plus.android.importClass("android.os.Build"); console.log(Build.VERSION.SDK_INT ) if(Build.VERSION.SDK_INT <11){ this.codec='software' } // #endif原创 2021-06-02 11:34:25 · 884 阅读 · 0 评论 -
判断微信小程序运行环境
版本:__wxConfig.envVersion‘develop’, //开发版‘trial’, //体验版‘release’, //正式版原创 2021-05-27 09:09:01 · 470 阅读 · 0 评论 -
node-sass安装过程中问题的解决
1. npm install -g cnpm --registry=https://registry.npm.taobao.org (安装淘宝镜像)2. cnpm install node-sass --save (使用淘宝镜像安装node-sass)如果cnpm无法加载文件C再powershell命令行之后,输入:set-ExecutionPolicy RemoteSigned,然后修改权限为A(Windos PowerShell 管理员运行)npm install node-sass --s原创 2021-05-24 16:32:46 · 147 阅读 · 0 评论 -
小程序发布后图片不显示问题
本地图片能正常显示,发布后图片不显示http://127.0.0.1:49287/__pageframe__/static/img/apply%20(11).png修改后:http://127.0.0.1:49287/__pageframe__/static/img/apply11.png微信里图片带特殊符号无法显示原创 2020-12-14 10:26:11 · 2094 阅读 · 1 评论 -
uni小程转发朋友圈参数失效问题
onShareTimeline() { console.log(this.id) return { title: this.title, query: 'query=' + encodeURIComponent(JSON.stringify(this.id)), success: function(res) { // 转发成功 console.log("转发成功:" + JSON.stringify(res)); }, fail...原创 2020-11-23 16:55:12 · 549 阅读 · 0 评论 -
uni前端通用超简洁树状数据填充
列表数据转树状(数据须有层级关系pid ) treeData.filter(p=>{ let childArr = treeData.filter(child=> p.id == child.pid); childArr.length>0 ? p.children=childArr : '' return p.pid==0;//0原创 2020-11-13 10:21:38 · 428 阅读 · 0 评论 -
小程序 saveimagetophotosalbum:fail invalid file type的问题
网络图片保存到本地 调用downloadfile后在真机临时文件路径有问题所以给一个固定路径使用:filePath1 let fileName = new Date().valueOf(); let filePath1 = wx.env.USER_DATA_PATH + '/' + fileName + '.jpg' uni.downloadFile({ url: this.host + filePa原创 2020-09-08 16:24:31 · 1218 阅读 · 0 评论 -
小程序转uniapp 打包app
[转换工具](https://ask.dcloud.net.cn/article/36037)npm install miniprogram-to-uniapp -g 安装更新npm install [email protected] -g 版本回退wtu -i "项目路径" -z 转换命令 (-z 墙砖vant 正常可不用加)原创 2020-08-03 17:26:14 · 1545 阅读 · 0 评论