uniapp
汤圆(dumpling)
粘贴复制代码太无趣,全靠我自己加戏。
展开
-
前端谷歌浏览器实现解决跨域
前端谷歌浏览器实现解决跨域原创 2022-06-16 10:20:21 · 114 阅读 · 0 评论 -
uniapp + uview 多图上传
<view class="upload-img"> <u-form-item label-width="150"> <u-upload ref="iupload" :style="{opacity: evaluationData.length > 6 ? 0 : ''}" width="150" height="150" :file-list="multipleImgs" :action="httpUrl原创 2021-09-16 17:28:05 · 558 阅读 · 0 评论 -
UNI-APP 解决 点击input框外发送按钮,键盘不收回
<view class="send" :class="isVoice?'hidden':''" @touchend.prevent="sendText"> <!-- @touchend.prevent 取消键盘自动收回--> <view class="btn">发送</view> </view>原创 2021-09-09 11:53:27 · 1555 阅读 · 0 评论 -
html2canvas合成图片 前端跨域问题 uniapp
问题描述 前端图片跨域---->修改源码: img.src = src + ‘?t=’ + new Date().getTime();前端—> 封装一个html2canvas组件<template> <view class="html2canvas" :prop="domId" :change:prop="html2canvas.create"> <slot></slot> </view></template原创 2021-08-17 10:46:16 · 1235 阅读 · 5 评论 -
uniapp跳转 外部网页 h5和app端
aboutLearnMore() { // 跳转外部链接h5 // #ifdef H5 window.location.href = 'http://www.baidu.com'; // #endif // #ifdef APP-PLUS plus.runtime.openURL('http://www.baidu.com') //不需要拼接 // plus.runtime.openURL(`http://${jumpUrl}`)//需要拼接 ...原创 2021-05-27 19:39:20 · 6158 阅读 · 11 评论 -
uniapp 点击两次底部tabbar 回到顶部
tabClick: false, // true 表示是两次点击中的第一次点了 tabBar(写在data里面)onTabItemTap(e) { if (e.index==0&&this.tabClick) { // 200ms 内再次点击 // 这里就是模拟的双击事件,可以写类似数据刷新相关处理 this.toTop(); } this.tabClick = true setTimeout(() => { this.tabClick原创 2021-05-27 19:17:10 · 1133 阅读 · 0 评论 -
uniapp微信公众号支付----微信小程序支付
// 微信支付 https://uniapp.dcloud.io/api/plugins/payment toResult(val) { let _this = this // #ifdef MP-WEIXIN let data = { userId: _this.userInfo.id, id: _this.sendData.id, payType: val, type: 0 } // #endif /...原创 2021-05-21 09:26:13 · 344 阅读 · 0 评论 -
正则验证手机号11位
checkPhone(value) { let myreg=/^[1][3,4,5,6,7,8,9][0-9]{9}$/; if (!myreg.test(value)) { return false; console.log("false") } else { return true; console.log("true") } },```javascript在这里插入代码片原创 2021-05-21 09:19:28 · 903 阅读 · 0 评论 -
uniapp实现多图上传
<template> <view class="four-img-flex"> <view class="upload-img"> <view class="viewimg" v-for="(item,index) in thumbnailUrls" :key="index"> <view class="delete-picture" @click="delcloudImg(index)" style="width: 40r原创 2021-05-17 11:45:38 · 734 阅读 · 0 评论