会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
欢迎加QQ交流:
加
油
!
2
0
2
3
源远流常,一居一安
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
9
10
11
12
13
14
15
16
17
下一页
2021年7月1日
微信小程序--设置和获取剪切板内容
摘要: 设置 wx.setClipboardData // 复制功能 获取 wx.getClipboardData // 粘贴功能 let _this = this wx.setClipboardData({ data: _this.data.phone, success: function (res) {
阅读全文
posted @ 2021-07-01 14:18 常安·
阅读(1679)
评论(0)
推荐(0)
2021年6月30日
微信小程序跳转小程序
摘要: wx.navigateToMiniProgram({ appId: ’id‘, path: 'path', }) 直接调用就可以了
阅读全文
posted @ 2021-06-30 17:29 常安·
阅读(106)
评论(0)
推荐(0)
2021年6月29日
小程序-时间戳转时间方法
摘要: time(time) { // 判断时间戳是否为13位数,如果不是则*1000,时间戳只有13位数(带毫秒)和10(不带毫秒)位数的 if(time.toString().length == 13){ var tme = getDate(time); }else{ var tme = getDate
阅读全文
posted @ 2021-06-29 15:08 常安·
阅读(334)
评论(0)
推荐(0)
2021年6月24日
小程序设置进度条
摘要: html <progress class="progress" percent="50" activeColor="#f2d2b7" active="true" border-radius="15" > </progress> css .progress { height: 15rpx; width
阅读全文
posted @ 2021-06-24 17:18 常安·
阅读(253)
评论(0)
推荐(0)
2021年6月17日
微信小程序 因文件大小不能使用本地背景图片解决方法
摘要: 因微信文件只允许2m,所以不能给图片太多空间。所以出现背景图片的坑 解决方案1: 把背景图片放到服务器文件件下,直接将路径给url。 得是https开头的路径才可以 解决方案2:将图片转换成base64的码,将码放到url里 1.是把图片转成base64码: wx.chooseImage({ suc
阅读全文
posted @ 2021-06-17 14:35 常安·
阅读(847)
评论(0)
推荐(0)
canvas 隐藏 踩坑
摘要: 当我在把canvas绘制完成时,要把canvas隐藏起来。试了display 和 opacity 都不行。 然后我用了 position: absolute; left:1000px; top:0; 给移除达到隐藏效果,但是却出现了滚动条。 最后把 absolute 换成 fixed 解决问题。
阅读全文
posted @ 2021-06-17 11:03 常安·
阅读(679)
评论(0)
推荐(0)
2021年6月16日
小程序canvas 圆角框带填充颜色
摘要: // ctx: 获取canvas的id const ctx = wx.createCanvasContext('canvasId') // x 横坐标 y 纵左边 w 框的宽度 h 框的高度 r 四个圆角的弧度 c 背景颜色 // canvasListLength : 类型为number。根据条件改
阅读全文
posted @ 2021-06-16 16:27 常安·
阅读(538)
评论(0)
推荐(0)
2021年6月15日
小程序 canvas 文字加粗
摘要: 在fillText前设置font属性 ctx.font = 'normal bold 18px sans-serif'; 但是有继承问题: 解决方法 - 1: 先绘制字体不加粗部分, 再绘制需要加粗部分, 这样就不会被继承 解决方法 - 2: 一个一个的将不需要加粗的重置字体样式也是可以的 ctx.
阅读全文
posted @ 2021-06-15 17:13 常安·
阅读(3267)
评论(0)
推荐(0)
flex布局 一行4个元素 后面不够4个元素对齐
摘要: html 父元素 .container { display: flex; flex-wrap: wrap;} 子元素.list { width: 24%; height: 100px; background-color: skyblue; margin-top: 15px;}.list:not(:n
阅读全文
posted @ 2021-06-15 09:34 常安·
阅读(5517)
评论(4)
推荐(0)
2021年6月11日
小程序实现轮播图
摘要: 先看效果: 上代码: 1. html页面 <!--pages/swiper/swiper.wxml--> <swiper indicator-dots="true" autoplay="true" interval="1000" duration="800" circular="true" > <!
阅读全文
posted @ 2021-06-11 09:25 常安·
阅读(569)
评论(0)
推荐(0)
上一页
1
···
9
10
11
12
13
14
15
16
17
下一页
公告