爬坑小程序

Snipaste_20210416_090826.jpg

清除button默认样式

          
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
.clearButtonStyle{ margin: 0; padding: 0; background-color: transparent!important; line-height: 1; border-radius: 0!important; } .clearButtonStyle::after { border: none; }

小程序多张image图片排列有空隙解决方案

          
  • 1
  • 2
  • 3
在image组件style中添加以下flex: <image style='width:100%;display:flex' mode='widthFix' ></image>

时间转时间戳

日期转换成时间戳:new Date('2018-09-03 15:46:13').getTime()

示例代码:

          
  • 1
console.log(new Date('2018-09-03 15:46:13'))

这个打印结果应该是时间戳,但是部分机型会返回 undefined 或者 Invalid date;

解决方法:

          
  • 1
console.log(new Date('2018-09-03 15:46:13'.replace(/-/g,"/")))

意思是把 2018-09-03 15:46:13 改为 2018/09/03 15:46:13

最后:

          
  • 1
console.log(new Date('2018-09-03 15:46:13'.replace(/-/g,"/")).getTime())

微信小程序scroll-view隐藏滚动条,部分安卓机仍然出现灰色滚动条的隐藏方式

Snipaste_20210202_173023.jpg
---end---
(完)
Nuxt3踩坑之useFetch和useLazyFetch
建议不要使用useLazyFetch
使用 cloudflare 反代 gravatar 免费生成国内镜像
国内gravatar无法直接访问,cloudflare 可以做一个自己的镜像网址
小程序云函数运用
小程序获取手机号,openid
React Refs的使用
Refs 提供了一种方式,允许我们访问 DOM 节点或在 render 方法中创建的 React 元素。
放假前摸鱼闲谈相亲
小时候以为人家墙上喷了个拆字,觉得好可怜都没房子住了,现在才知道那个字读富
周处除三害,鬼怪,斗罗大陆
随便聊聊最近看完的
等待你的评论