- wx:key = "{{*this}}" 二维码预览编译时报错
- 需求的场景描述(希望解决的问题) wx:key = "{{*this}}" 功能没问题,console里没有警告没有报错,但二维码预览编译时报错,Error: wxml 编译错误,错误信息:./pages/goorders/goorders.wxml:6:117: Bad attr `wx:key` with message: unexpected token `*`. - 希望提供的能力
2018-07-31 - cover-image加载问题
嵌套在map组件内的cover-image [代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"detail-box"[代码] [代码]hidden[代码][代码]=[代码][代码]"{{!spotDetail.show}}"[代码] [代码]catchtap[代码][代码]=[代码][代码]"markersMenuTap"[代码] [代码]id[代码][代码]=[代码][代码]"1"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"flex-h img-title"[代码][代码]>[代码][代码] [代码][代码]<!--发现cover-image没有加wx:if,首次图片会渲染不了 -->[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"img-box"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-image[代码] [代码]class[代码][代码]=[代码][代码]"img"[代码] [代码]src[代码][代码]=[代码][代码]"{{spotDetail.newPlaceImgUrl}}"[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{spotDetail.newPlaceImgUrl}}"[代码] [代码]binderror[代码][代码]=[代码][代码]"detailImgErr"[代码] [代码]bindload[代码][代码]=[代码][代码]"detailImgLoad"[代码][代码]></[代码][代码]cover-image[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-image[代码] [代码]class[代码][代码]=[代码][代码]"play"[代码] [代码]src[代码][代码]=[代码][代码]"{{audio.isPlay?'../../img/pause-icon-v2.png':'../../img/play-icon-v2.png'}}"[代码] [代码]catchtap[代码][代码]=[代码][代码]"audioSpotDetail"[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{spotDetail.type==='spot'&&spotDetail.isHaveExplainContents}}"[代码][代码]></[代码][代码]cover-image[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]cover-view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"title-box"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"title"[代码][代码]>{{spotDetail.title}}</[代码][代码]cover-view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]cover-view[代码] [代码]class[代码][代码]=[代码][代码]"btn"[代码] [代码]catchtap[代码][代码]=[代码][代码]"markersMenuTap"[代码] [代码]id[代码][代码]=[代码][代码]"2"[代码][代码]>前往</[代码][代码]cover-view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]cover-view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]cover-view[代码][代码]>[代码][代码]</[代码][代码]cover-view[代码][代码]>[代码][代码].detail-box {[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码] [代码][代码]bottom[代码][代码]: [代码][代码]0[代码][代码];[代码][代码] [代码][代码]padding[代码][代码]: [代码][代码]39[代码][代码]rpx [代码][代码]39[代码][代码]rpx;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]/* height: 462rpx; */[代码][代码] [代码][代码]background[代码][代码]: [代码][代码]white[代码][代码];[代码][代码] [代码][代码]-webkit-box-sizing: border-box;[代码][代码] [代码][代码]box-sizing: border-box;[代码][代码]}[代码][代码].detail-box .close-btn {[代码][代码] [代码][代码]display[代码][代码]: [代码][代码]block[代码][代码];[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码] [代码][代码]top[代码][代码]: [代码][代码]0[代码][代码];[代码][代码] [代码][代码]right[代码][代码]: [代码][代码]39[代码][代码]rpx;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]60[代码][代码]rpx;[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]60[代码][代码]rpx;[代码][代码] [代码][代码]text-align[代码][代码]: [代码][代码]center[代码][代码];[代码][代码]}[代码] [代码].detail-box .close-btn cover-image {[代码][代码] [代码][代码]margin[代码][代码]: [代码][代码]18[代码][代码]rpx [代码][代码]auto[代码][代码];[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]39[代码][代码]rpx;[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]39[代码][代码]rpx;[代码][代码] [代码][代码]/* line-height: auto; */[代码][代码]}[代码] [代码].detail-box .img-title {[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]relative[代码][代码];[代码][代码] [代码][代码]font-size[代码][代码]: [代码][代码]32[代码][代码]rpx;[代码][代码] [代码][代码]color[代码][代码]: [代码][代码]#363636[代码][代码];[代码][代码] [代码][代码]line-height[代码][代码]: [代码][代码]48[代码][代码]rpx;[代码][代码] [代码][代码]overflow[代码][代码]: [代码][代码]hidden[代码][代码];[代码][代码]}[代码] [代码].img-title .img-box {[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]relative[代码][代码];[代码][代码] [代码][代码]margin-right[代码][代码]: [代码][代码]27[代码][代码]rpx;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]180[代码][代码]rpx;[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]180[代码][代码]rpx;[代码][代码]}[代码] [代码].img-box .img {[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码] [代码][代码]top[代码][代码]: [代码][代码]0[代码][代码];[代码][代码] [代码][代码]left[代码][代码]: [代码][代码]0[代码][代码];[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]border[代码][代码]: [代码][代码]solid[代码] [代码]1px[代码] [代码]transparent[代码][代码];[代码][代码] [代码][代码]border-radius: [代码][代码]9[代码][代码]rpx;[代码][代码] [代码][代码]-webkit-box-sizing: border-box;[代码][代码] [代码][代码]box-sizing: border-box;[代码][代码]}[代码] [代码].img-box .play {[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码] [代码][代码]top[代码][代码]: [代码][代码]50%[代码][代码];[代码][代码] [代码][代码]left[代码][代码]: [代码][代码]50%[代码][代码];[代码][代码] [代码][代码]margin[代码][代码]: [代码][代码]-42[代码][代码]rpx [代码][代码]-42[代码][代码]rpx;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]84[代码][代码]rpx;[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]84[代码][代码]rpx;[代码][代码]}[代码] [代码].img-title .title {[代码][代码] [代码][代码]margin-bottom[代码][代码]: [代码][代码]15[代码][代码]rpx;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]426[代码][代码]rpx;[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]99[代码][代码]rpx;[代码][代码] [代码][代码]line-height[代码][代码]: [代码][代码]51[代码][代码]rpx;[代码][代码] [代码][代码]font-size[代码][代码]: [代码][代码]32[代码][代码]rpx;[代码][代码] [代码][代码]color[代码][代码]: [代码][代码]#363636[代码][代码];[代码][代码] [代码][代码]overflow[代码][代码]: [代码][代码]hidden[代码][代码];[代码][代码] [代码][代码]white-space[代码][代码]: pre-wrap;[代码][代码]}[代码] 父容器用的absolute定位,,图片父容器用的relative定位,图片是absolute定位。 会出现cover-image.img使用的阿里云cdn地址图片,但是IOS经常渲染不出来,加了bindload和binderror发现能正常进入load函数,可是图片是空白的 [图片] [图片] 被cover-image加了border和wx:if都没办法解决。。如果有遇到的朋友希望告知下是什么原因导致的。怎么解决
2018-06-25