- 使用uniapp 开发小程序 打包小程序uview的组件打包报错?
都是从git 上刚刚拉下来的,依赖都有装好, 同事的可以跑通,本人就不行, 小程序报错 没找到uview 的组件 但是组件是有的[图片] [图片]
01-17 - 小程序的e.currentTarget.dataset 的值1 放到数组当下标报错 1 没定义?
[图片] <!--正面的框 --> <image src="https://www.chaochaotool.top:444/CQC/cow/01rice.png" mode="aspectFit" class="image-front" animation="{{animation[1]}}" bindtap='rotateFn' data-id="1"></image> <!--背面的框 --> <image src="https://www.chaochaotool.top:444/CQC/cow/11rice.png" mode="aspectFit" class="image-back" animation="{{animation_back[1]}}"></image> </view> <!-- 2 --> <view class="main1"> <image src="https://www.chaochaotool.top:444/CQC/cow/02happy.png" mode="aspectFit" class="image-front" animation="{{animation[2]}}" bindtap='rotateFn' data-id="2"></image> <!--背面的框 --> <image src="https://www.chaochaotool.top:444/CQC/cow/12happy.png" mode="aspectFit" class="image-back" animation="{{animation_back[2]}}" ></image> rotateFn(e) { var id = parseInt(e.currentTarget.dataset.id) this.setData({ id:id }) console.log("反转ID:"+id) var Temp="animationMain["+id+"]" console.log("hope数组为"+Temp) var backTemp="animationback["+id+"]" console.log("hope数组为"+backTemp) this.animation_main = wx.createAnimation({ duration:400, timingFunction:'linear' }) this.animation_back= wx.createAnimation({ duration:400, timingFunction:'linear', }) // 点击正面 this.animation[id].rotateY(180).step() this.animation_back[id].rotateY(0).step() this.setData({ //animationMain1: this.animation_main.export(), //animationBack1: this.animation_back.export(), // animationMain2: this.animation_main.export(), //animationBack2: this.animation_back.export(), // animationMain:[id]=this.animation[id].export(), //animation_back:[id]=this.animation_back[id].export(), [Temp]: this.animation_back.export(), [backTemp]:this.animation_back.export(), }) console.log("id值修改为:"+this.data.id) //} }, [图片]
2020-12-24