也尝试过将marker的zIndex设置为-1了,还是无法解决。
Map组件marker自定义气泡会被其他marker遮挡如何解决?问题:小程序,调用Map组件,marker 上的自定义气泡( customCallout )会被其他marker遮挡。 尝试再.customCallout设置z-index,无法解决,求解决办法,谢谢。 WXML: <map id="myMap" latitude="{{currentLatitude}}" longitude="{{currentLongitude}}" show-location="true" circles="{{circles}}" enable-satellite="{{satellite}}" show-compass="true" enable-overlooking="true" markers="{{scale>=17?markers:false}}" bindregionchange="bindRegionChanged" bindmarkertap="bindMarkerTap"> <cover-view slot="callout"> <block wx:for="{{markers}}" wx:key="index"> <cover-view class="customCallout" marker-id="{{index}}"> <cover-view class="content"> 这个是自定义气泡{{item.obdName}} </cover-view> </cover-view> </block> </cover-view> </map> WXSS: .customCallout { width: 350rpx; height: 200rpx; background-color: rgba(255, 255, 255, 0.9); box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1); border-radius: 10rpx; } [图片]
2021-03-15db.collection('support').where(_.and({isClosedLoop: event.isClosedLoop},_.or({frontlineOpenId: thisOpenId},{supportOpenId: thisOpenId}))).orderBy('createTime', 'desc').get()
关于数据库查询,包含or的多条件规范写法是怎样?代码如下,我希望: 条件一:isClosedLoop: event.isClosedLoop 条件二:frontlineOpenId或supportOpenId等于thisOpenId 按照如下写法,isClosedLoop这个条件并不生效,请指教怎么写才规范,谢谢 const query = await db.collection('support').where(_.or([{ frontlineOpenId: thisOpenId }, { supportOpenId: thisOpenId } ]), { isClosedLoop: event.isClosedLoop }).orderBy('createTime', 'desc').get()
2020-07-28markers="{{scale>=16?markers:false}}"
地图如何根据scale显示markers?以下代码markers="{{scale>=16?'markers':''}}"是为了实现地图缩放级别大于16时,则显示标记点,为什么会无效,是不是写法错误?请指教,谢谢。 补充:data中的scale经过测试,数据没有问题,应该时html写法错误。 <view style="height:100vh;width:100vw;"> <map id="myMap" class="width height" show-location="true" latitude="{{location.latitude}}" longitude="{{location.longitude}}" markers="{{scale>=16?'markers':''}}" bindregionchange="regionchange"></map> </view>
2020-06-27改了一下,初步测试没有问题,请各位大佬拍砖。 wxml: <view class="container"> <view class="page-body"> <view class="page-section page-section-spacing swiper"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for="{{background}}" wx:key="index"> <swiper-item> <view class="swiper-item swiper-item-{{index}}" style="background: url({{item.swiperImg}})"></view> </swiper-item> </block> </swiper> </view> </view> </view> JS: data: { background: [{"swiperImg":"https://qiniu-image.qtshe.com/1536067857379_122.png"},{"swiperImg":"https://qiniu-image.qtshe.com/1536068379879_115.png"},{"swiperImg":"https://qiniu-image.qtshe.com/1536068319939_230.png"}], indicatorDots: true, vertical: false, autoplay: true, interval: 2000, duration: 500 } wxss: .swiper-item-1{ position: relative; align-items: center; justify-content: center; background-size: 100%; color: #FFFFFF; font-size: 36rpx; } .swiper-item-1:before{ content: 'A'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .swiper-item-2{ position: relative; align-items: center; justify-content: center; background-color: #2782D7; color: #FFFFFF; font-size: 36rpx; } .swiper-item-2:before{ content: 'B'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .swiper-item-3{ position: relative; align-items: center; justify-content: center; background-color: #F1F1F1; color: #353535; font-size: 36rpx; } .swiper-item-3:before{ content: 'C'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
swiper组件报错Do not set same key object in wx:key?swiper组件设置wx:key="*this",报错VM2484:1 Do not set same key \"[object Object]\" in wx:key. 请教代码该怎么改?谢谢 wxml: <view class="container"> <view class="page-body"> <view class="page-section page-section-spacing swiper"> <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for="{{background}}" wx:key="*this"> <swiper-item> <view class="swiper-item {{item}}" style="background: url({{item.swiperImg}})"></view> </swiper-item> </block> </swiper> </view> </view> </view> JS: data: { background: [{"swiperImg":"https://qiniu-image.qtshe.com/1536067857379_122.png"},{"swiperImg":"https://qiniu-image.qtshe.com/1536068379879_115.png"},{"swiperImg":"https://qiniu-image.qtshe.com/1536068319939_230.png"}], indicatorDots: true, vertical: false, autoplay: true, interval: 2000, duration: 500 }
2020-05-19