![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
微信小程序
文章平均质量分 56
jfengz
web前端开发
展开
-
微信小程序—在线预览二进制流文件
// 请求 下载预约表格 接口 exportExcel (e) { let that = this let id = that.getPageOptions().id let fileName = `【${that.data.holderInfo.nameC}】 ${that.data.bookingInfo.area}-${that.data.productInfo.company}-${that.data.productInfo.plan}` wx.showLoadi原创 2021-03-29 17:20:51 · 808 阅读 · 0 评论 -
小程序swiper高度自适应
1、wxml部分<block wx:for="{{list}}" wx:key="index"> <view class="list-item-m" style="height: {{imgheights[index]}}rpx"> <!-- 轮播图 S --> <swiper data-idx="{{index}}" bindchange="swiperChangeEv" style="height: {{imgheights[index]}原创 2020-12-10 10:49:45 · 266 阅读 · 0 评论 -
小程序输入框导致页面整体上移,在获得焦点时固定住页面的解决办法
1、输入框组件设置 adjust-position="{{false}}"2、输入框容器fixed定位,style="bottom: {{bottom}}px"3、如下// 监听input获取焦点 onFocus (e) { let that = this that.setData({ bottom: e.detail.height }) }, // 监听input失去焦点 onBlur (e) { let that = this t原创 2020-12-07 19:26:16 · 1685 阅读 · 1 评论 -
关于小程序输入框文字回车符提交后,返回的数据换行问题
let str = "哈哈哈哈↵测试测试";str = str.replace(/↵/g,"\n");<text>{{str}}</text>tips:str需要在 <text> 标签里原创 2020-09-08 11:26:01 · 590 阅读 · 0 评论 -
检查小程序版本更新
在app.js里添加以下代码:// 检查小程序版本更新 checkNewVersion: function () { // 检查版本更新 // 获取小程序更新机制兼容 if (wx.canIUse('getUpdateManager')) { const updateManager = wx.getUpdateManager() updateManager.onCheckForUpdate(function (res) { // 请求完新版本信息原创 2020-09-04 11:22:23 · 205 阅读 · 0 评论 -
微信小程序--实现下载预览文件并分享
转发:https://developers.weixin.qq.com/community/develop/doc/000e44edfbc438456baad9d895e400原创 2020-07-15 16:25:04 · 1609 阅读 · 0 评论 -
微信小程序分享文件给好友
1、wxml代码<button class="download" bindtap="openFileEv">打开文件</button>2、js代码// 打开文件 openFileEv () { wx.downloadFile({ url: 'https://download.com/file/xxx.xlsx', // 并非真实链接 success: function (res) { const filePath = res原创 2020-07-07 17:49:20 · 4121 阅读 · 0 评论