会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shuihanxiao
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
8
···
18
下一页
2023年6月2日
判断数组内所有属性均相等
摘要: if( this.data.orderList.every(item=>item.obligationTime this.data.orderList[0].obligationTime)){ console.log('全等') this.data.flag=true clearInterval(t
阅读全文
posted @ 2023-06-02 16:32 shuihanxiao
阅读(22)
评论(0)
推荐(0)
2023年5月6日
下端下载文件几种方式
摘要: 一、a标签download下载后端返回一个可下载的url文件,或者前端本地保存的文件,通过路径引入下载。(1)将资源放入前端本地保存,打包后随一起上传自服务器 // 本地资源下载,引入路径即可,这里的路径指的是打包后文件与代码文件的相对路径<a href="./import-template.xls
阅读全文
posted @ 2023-05-06 20:37 shuihanxiao
阅读(135)
评论(0)
推荐(0)
2023年5月4日
验证码,发送短信验证码,校验确认密码和密码,密码需要数字字母特殊字符任选2种组合
摘要: 密码需要数字字母特殊字符任选2种组合 const validatePwd=(rule, value, callback)=>{ const reg=/(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%^&*?]{8,32}$/ if (reg.test(val
阅读全文
posted @ 2023-05-04 16:31 shuihanxiao
阅读(327)
评论(0)
推荐(0)
2023年4月26日
小程序自定义导航如何实现的
摘要: onLaunch() { // 展示本地存储能力 const logs = wx.getStorageSync('logs') || [] logs.unshift(Date.now()) wx.setStorageSync('logs', logs) // 获取系统信息 this.globalDa
阅读全文
posted @ 2023-04-26 17:50 shuihanxiao
阅读(41)
评论(0)
推荐(0)
2023年4月19日
小程序调用图片,视频,相机功能
摘要: //调用图片和相机 choosePic() { console.log("table") var _this = this wx.chooseImage({ count: 9, // 最多可以选择的图片张数,默认9 sizeType: ['original', 'compressed'], // o
阅读全文
posted @ 2023-04-19 15:42 shuihanxiao
阅读(184)
评论(0)
推荐(0)
小程序打印小票,复制功能,自定义导航栏
摘要: // 复制联系地址 fnCopyAddress() { wx.setClipboardData({ data: this.data.detailInfo.address, success: res => { Util.errorShow('复制联系地址成功') } }) }, // 打印小票 fnP
阅读全文
posted @ 2023-04-19 09:44 shuihanxiao
阅读(110)
评论(0)
推荐(0)
2023年4月17日
获取一个字符串值在指定字符串第n次出现的位置
摘要: function find(str,cha,num){ var x=str.indexOf(cha); for(var i=0;i<num;i++){ x=str.indexOf(cha,x+1); } return x; } 获取一个字符串值在指定字符串第n次出现的位置 就像上面的例子,hello
阅读全文
posted @ 2023-04-17 11:10 shuihanxiao
阅读(127)
评论(0)
推荐(0)
el-input输入校验
摘要: <el-input type="textarea" style="width: 100px !important;" :max="9999" :min="0" :precision="0" :step="1" :controls="false" v-model.number="detailsData
阅读全文
posted @ 2023-04-17 10:48 shuihanxiao
阅读(496)
评论(0)
推荐(0)
数组去重
摘要: this.selectedSupplielist.forEach(async item => { if (this.hasSelectSupplier.filter(ite => item.supplierSn == ite.supplierSn).length == 0) { this.hasSe
阅读全文
posted @ 2023-04-17 10:46 shuihanxiao
阅读(15)
评论(0)
推荐(0)
vue中el-checkbox全选、反选、多选
摘要: <template> <div> <el-checkbox v-model="checkAll" @change="handleCheckAllChange" :indeterminate="isIndeterminate" >全选</el-checkbox > <el-checkbox v-mod
阅读全文
posted @ 2023-04-17 09:35 shuihanxiao
阅读(1570)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
18
下一页
公告