[图片][图片][图片]
swiper组件动态渲染出现undenfined?swiper组件 场景复现:我有一个列表数组,使用current-item-id来定位当前元素,每次移动到列表头部或者尾部动态切分列表,重新渲染swiper,我发现在截取数组重新渲染的时候 会出现如下错误: webviewScriptError Cannot read property '$$' of undefined TypeError: Cannot read property '$$' of undefined at HTMLElement._attached.wx.getPlatform._touchstartHandlerForDevtools 感觉是不是current-item-id的定位出现了问题,但是我的渲染数组实实在在是有item-id的元素的。 哪些有经验的大佬可以帮忙看看,感谢! 代码如下: <swiper :current-item-id="'index_'+ currentIndex" style="height: 100%;" @change="changeSubject" v-if="subjectList.length > 0"> <swiper-item v-for="(item,index) in subjectList" :item-id="'index_'+item.index" :key="item.index"> <view class="d-flex"> <view class="title"> {{item.title}} </view> </view> </swiper-item> </swiper> getSubjectList(){ if(this.startIndex<this.currentIndex && this.currentIndex<this.endIndex){ return; } //到达最后了数组扩容一下 if(this.currentIndex == this.endIndex){ this.startIndex = Math.max(this.currentIndex - 2,0); this.endIndex = Math.min(this.endIndex + this.step,this.todayTask.subjects.length - 1) } if(this.currentIndex == this.startIndex){ this.startIndex = Math.max(this.startIndex - this.step,0) this.endIndex = Math.min(this.currentIndex + this.step,this.todayTask.subjects.length - 1) } this.subjectList = []; this.subjectList = this.todayTask.subjects.slice(this.startIndex,this.endIndex + 1) console.log(this.subjectList) }, changeSubject(e){ this.currentIndex = e.detail.currentItemId.replace('index_','') - 0 console.log(this.currentIndex) this.getSubjectList() },
2020-05-07[图片]
开发者工具新建项目后报错?开发者版本:1.02.2004020 新建项目后控制台报错: VM17:1 appServiceSDKScriptError Cannot read property 'operationInfo' of undefined;at api onAppRoute callback function TypeError: Cannot read property 'operationInfo' of undefined appServiceSDKScriptError Cannot read property 'operationInfo' of undefined;at wxConfig.onReady callback TypeError: Cannot read property 'operationInfo' of undefined
2020-04-04谢谢大家已经解决,是第三方类库把pages写错了
已上线的小程序,本地调用生成无限制二维码问题?我有两个已经2018年已经上线的小程序,现在在本地使用生成无限制的小程序码接口。 https://api.weixin.qq.com/wxa/getwxacodeunlimit 我发现不管传不传page参数,都会提示invalid page hint: [w6gwNa06802372] 求解答?是不是只有在业务域名下请求此接口才可以?因为我确定小程序页面的pages/index/index是发布的。
2020-04-04