- 博客(62)
- 收藏
- 关注
原创 object-position 像素值转换为百分比
X% = Xpx / (容器宽度 - 元素宽度) * 100。Y% = Ypx / (容器宽度 - 元素宽度) * 100。
2024-11-29 16:28:27
105
原创 android studio升级后编译发现不兼容回到旧版本还是不兼容
删除整个 .gradle/caches/ 目录。不然会报重复gradle错误。在android目录下执行。
2024-11-13 22:36:26
1059
原创 flutter Uint8List to Pointer<Uint8>
【代码】flutter Uint8List to Pointer<Uint8>
2024-04-29 17:52:22
531
2
原创 flutter dio使用proxyman抓包进行网络调试
手机和电脑连上同一个wifi,并且手机wifi使用代理,代理地址为电脑的ip和proxyman设置的监听端口。
2023-12-28 11:43:37
1208
原创 flutter websocket发送ping包?
服务端要求flutter客户端隔一段时间发送ping包,以此来建立心跳管理长连接。这个类才有pingInterval的配置,可以定时发送ping包。详细可以点进去看源码,默认是null,也就是不会发ping包。
2023-12-26 16:21:02
971
原创 android studio 打开flutter项目 出现 dart sdk is not configured
4 打勾Enable Dart support for the following modules。3 Dart SDK path 选择flutter/bin/cache/dart-sdk。2 打勾Enable Dart support for the project。1 点击Open Dart setting。
2023-12-04 20:48:04
1202
原创 flutter pod install, Error installing FMDB
根据最后一条提示 到ios/Podfile文件下取消这行注释。
2023-11-13 10:10:24
1332
原创 vscode使用eslint保存代码自动格式化的坑
坑挺多的,查了很多资料弄好了,大家可以参考一下主要是为了识别.eslintrc.js文件,格式化vue,js,ts文件。
2023-02-23 16:59:28
484
原创 sourcetree 已贮藏误删如何恢复
参考文章 https://zhuanlan.zhihu.com/p/28948567。我删除的那条贮藏是最后一条commit 73def9…这边不确定的话可以通过。
2023-02-23 15:54:30
3473
2
原创 position fixed 不是基于浏览器窗口的问题
文档里讲了:当元素祖先的 transform, perspective 或 filter 属性非 none 时,容器由视口改为该祖先。文档:https://developer.mozilla.org/zh-CN/docs/Web/CSS/position。
2022-12-02 15:14:08
514
原创 css伪类 :nth-child
标签>:nth-of-type(n) 该标签的位置属于父级的第n个儿子。:nth-child(n) 该标签的位置属于父级的第n个儿子。:first-child 该标签的位置属于父级的第1个儿子。
2022-11-03 11:23:51
189
原创 本地资源加载不了 file:// net::ERR_UNKNOWN_URL_SCHEME
file:// net::ERR_UNKNOWN_URL_SCHEME解决 开发环境使用tsFile://,生产环境使用file://
2022-06-23 14:38:06
586
原创 字体子集化fontmin应用
const fm = require('fontmin')const f = './字体名称.ttf'const fontmin = new fm()fontmin.src(f) .use(fm.glyph({ text: '天地玄黄 宇宙洪荒' })) .use(fm.ttf2svg())// .dest('./public') //生成文件路径fontmin.run((err, files, stream) => { // 回调进行更多操作 console
2022-05-27 16:04:47
409
原创 图片 url blob base64 互转
待补充// url to blobexport const urlToBlob = async (url: string) => { return new Promise(resolve => { fetch(url).then(res => res.blob()).then(blob => { resolve(blob) }) })}// blob to base64export const blobToDataURI = (blob
2022-03-23 02:11:24
692
原创 关于节点元素dragenter dragleave频繁触发的问题
解决1、计数 dragenter和dragleave最终触发次数是相等的2、判断currentTarget和relatedTargetconst onDragenterProduct = (index: number, e: any) => { dragenterProductIndex.value = index}const onDragleaveProduct = (e: any) => { // 如果当前的节点不包含上个节点就是离开 if (!e.currentTar
2022-02-18 11:50:58
1897
原创 ondrop事件监听不到
解决: 添加dragover事件并阻止默认事件<div @dragover.prevent @drop="handleDrop" />
2022-02-09 13:36:56
668
原创 glDrawElements: Source and destination textures of the draw are the same.
pixi.js app.renderer.plugins.extract.image 导出报错 导致Graphics是黑的GL ERROR :GL_INVALID_OPERATION : glDrawElements: Source and destination textures of the draw are the same.原因不是很明白,好像是自己draw自己最后解决方案是不用app.renderer导出,重新new一个renderer用来导出,导出完再destroy。...
2022-01-25 11:24:56
325
原创 getBoundingClientRect offsetWidth offsetHeight
对于一个旋转的dom元素,getBoundingClientRect()得到的width,height是外接矩形的宽高,offsetWidth offsetHeight是未旋转前dom的宽高
2022-01-19 17:46:48
883
原创 pixi.js 导出部分区域裁剪图片
方案先通过api到出image对象,在通过canvas绘制图片,在导出数据代码const { x, y } = this.app.stage.getBounds() // 超出的x,yconst stageImage = this.app.renderer.plugins.extract.image(this.app.stage, "image/jpeg", 1)stageImage.onload = () => { const canvasElement = document.crea
2022-01-18 11:25:39
1828
原创 解决 Mac 左滑浏览器默认的返回事件
阻止 document.body.style.overscrollBehaviorX = ‘none’恢复 document.body.style.overscrollBehaviorX = ‘auto’参考 https://juejin.cn/post/6947858245356617764#heading-6
2021-12-14 14:34:15
3488
原创 Pixi.js 显示文字无法换行
官方案例message.style = {wordWrap: true, wordWrapWidth: 100, align: center};中文无法换行,设置breakWords属性sprite.style = { wordWrap: true, wordWrapWidth: 100, breakWords: true }
2021-11-19 15:27:49
1004
原创 求旋转后的坐标
坐标点target,中心点center,角度angle// 旋转后坐标function getRotatePoint(targetX, targetY, centerX, centerY, angle){ const rotation = angle * Math.PI / 180 const x = (targetX - centerX) * Math.cos(rotation) - (targetY - centerY)*Math.sin(rotation) + centerX cons
2021-11-12 13:46:37
693
原创 应用窗口置顶工具 DeskPins
作者链接地址:DeskPins安装后点击右下角的小图标,再选择要置顶的窗口。右键进入配置项可以设置置顶快捷键。
2021-09-18 17:09:23
1294
原创 npm publish ERR 403
npm ERR! code E403npm ERR! 403 403 Forbidden - PUT http://registry.npmjs.org/dyhao - Forbiddennpm ERR! 403 In most cases, you or one of your dependencies are requestingnpm ERR! 403 a package version that is forbidden by your security policy.npm ERR! A
2021-09-18 12:07:00
434
原创 Taro map customCallout问题
实现一直只显示一个自定义callout实现一直只显示一个自定义callout,当点击另一个商店图标时,当前的自定义callout消失,对应的展示。// marker数据结构{ id: e.emallIndex, // 唯一的id latitude: e.addressInfo.loc[1], // 纬度 longitude: e.addressInfo.loc[0], // 经度 iconPath: 'https://qn-qghotel.lindingtechnology.
2021-09-14 11:44:10
1089
原创 scroll-view安卓滚动不生效
参考博客问题scroll-view竖向滚动,高度为100vh时,在模拟器以及IOS上都正常滚动,在android系统上却无法滚动。解决需要在样式加上overflow-y: scroll;
2021-07-06 10:40:42
868
1
原创 对接飞鹅接口一直提示未注册
参数没有传成功解决const qs = require('querystring')const data = qs.stringify({ user, stime, sig, apiname, ...params })const res = await axios.post('http://api.feieyun.cn/Api/Open/', data)
2021-06-10 09:42:58
749
原创 React 动态引入组件的骚操作
组件文件export { default as Home } from '../../home/index'export { default as Mine } from '../../personal/entrance/index'export { default as Find } from '../../find/index'export { default as Emall } from '../../home/emallEntrance/index'引用组件class FunPage
2021-06-07 12:16:08
544
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人