应该是开发者工具的问题?应该不会影响真机吧?我使用Nightly 1.06.2507022看这个问题解决了,最新的稳定版1.06.2504010还是有问题。
skyline环境下改变一张图片的宽高时会无限重复加载<snapshot id="view" class="snapshot-container" mode="view"> <!-- 外层横向滚动 --> <scroll-view scroll-x class="outer-scroll"> <!-- 内层纵向滚动 --> <scroll-view scroll-y class="inner-scroll" style="width: {{750 * scale}}rpx;"> <view class="image-wrapper" style="width: {{750 * scale}}rpx; height: {{750 * scale}}rpx;"> <image src="{{img}}" class="main-image" style=" width: {{750}}rpx; height: {{750}}rpx; transform: translate(-50%, -50%) scale({{scale}});" /> <!-- 遍历区域 --> <block wx:for="{{areas}}" wx:key="id" wx:for-item="areaItem"> <view class="element-container" style="right: {{areaItem.right * scale}}rpx; top: {{areaItem.top * scale}}rpx; width: {{areaItem.width * scale}}rpx; height: {{areaItem.height * scale}}rpx;border: {{generate ? (info.borderColor ? '1px dashed ' + info.borderColor : '1px dashed #999') : '1px dashed transparent'}}; box-shadow: 0px 0px 5px 2px {{areaItem.id == currentContainerId && generate ? 'transparent' : 'transparent'}};" data-areaid="{{areaItem.id}}"> <!-- 当前区域的元素 --> <block wx:for="{{elements}}" wx:key="id"> <block wx:if="{{item.areaId === areaItem.id}}"> <!-- 图片元素 --> <view wx:if="{{item.type === 'image'}}" class="element image-element {{activeElementId === item.id && generate ? 'active' : ''}}" style="width: {{item.width * scale}}rpx;height: {{item.height * scale}}rpx;left: {{item.x * scale}}rpx;top: {{item.y * scale}}rpx;transform: rotate({{item.rotate}}deg);opacity: {{item.opacity}};z-index: {{item.zIndex}};" catchtouchstart="handleTouchStart" catchtouchmove="handleTouchMove" catchtouchend="handleTouchEnd" data-id="{{item.id}}"> <image src="{{item.src}}?width={{item.width}}" mode="aspectFill" class="element-image" wx:key="{{item.src}}" /> <view class="resize-handle {{generate ? 'resizeactive' : ''}}" catchtouchstart="handleResizeStart" data-id="{{item.id}}" style="transform: scale({{1 * scale}});"></view> </view> <!-- 文字元素 --> <view wx:if="{{item.type === 'text'}}" class="element text-element {{activeElementId === item.id && generate ? 'active' : ''}}" style="width: {{item.width * scale}}rpx;height: {{item.height * scale}}rpx;left: {{item.x * scale}}rpx;top: {{item.y * scale}}rpx;transform: rotate({{item.rotate}}deg);opacity: {{item.opacity}};color: {{item.color}};writing-mode: {{item.vertical ? 'vertical-rl' : 'horizontal-tb'}};font-size: {{item.fontSize * scale}}rpx;letter-spacing: {{item.spacing * scale}}rpx;z-index: {{item.zIndex}};" catchtouchstart="handleTouchStart" catchtouchmove="handleTouchMove" catchtouchend="handleTouchEnd" data-id="{{item.id}}"> {{item.content}} <view class="resize-handle {{generate ? 'resizeactive' : ''}}" catchtouchstart="handleResizeStart" data-id="{{item.id}}" style="transform: scale({{1 * scale}});"></view> </view> </block> </block> </view> </block> </view> </scroll-view> </scroll-view> </snapshot
07-04这个提示感觉很多余啊。很多小程序导航栏这里都会放搜索框什么的,这个提示我看停留的时间还不短,很影响用户的使用。 应该也有不少小程序为了导航栏不和胶囊重叠,会读取胶囊的宽度,如果这时出现提示,读到的宽度就特别大,挤占导航栏的内容,还得监听onMenuButtonBoundingClientRectWeightChange来适配。
更新后,为啥每次打开都出现了这样一个提示:相关服务由xx小程序提供?[图片]
2024-09-25