<view> <view> <image wx:for="{{item.imglist}}" wx:for-item="itemImg" wx:key="*this" bindload="imageOnload" src="{{ itemImg}}" bindtap="showResizeModal" data-src="{{itemImg}}"></image> </view> </view> <!-- 缩放 --> <view wx:if="{{isCheckDtl}}"> <import src="https://www.jb51.net/components/resizePicModal/resizePicModal.wxml"/> <template is="resizePic" data="{{img}}"></template> </view>
业务页面js,引用js文件,实例化resizePicModal
var that var resizePicModal = {} var app = getApp() var resizePicModalService = require('../../components/resizePicModal/resizePicModal.js') /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { that = this 8 resizePicModal = new resizePicModalService.ResizePicModal() }
总结
以上所述是小编给大家介绍的微信小程序movable view移动图片和双指缩放实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!
您可能感兴趣的文章: