cxm151254182
cxm151254182
  • 发布:2025-09-03 13:54
  • 更新:2025-09-03 15:02
  • 阅读:48

uiapp map配置circles 其中fillColor 透明度#5DB9F91A 不生效

分类:uni-app

产品分类: uniapp/H5

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: Windows 11Version 24H2的08

HBuilderX类型: 正式

HBuilderX版本号: 4.76

浏览器平台: Chrome

浏览器版本: 139.0.7258.155

项目创建方式: HBuilderX

示例代码:
···<map id="my_map" min-scale="4" max-scale="18" scale="14" circles="[{ latitude: this.latitude,
longitude: this.longitude,
radius: 1200,
color:'#5DB9F9FF',
strokeWidth:1,
fillColor: '#5DB9F91A'}]" latitude="latitude" longitude="longitude" style="width:100%;" style="{'height':mapHeight}" show-location="true" markers="covers" @markertap="markertapEvent">
<cover-view class="daycare-box" v-if="Object.keys(currentDaycare).length">
<cover-view class="top-box">
<cover-view class="daycare-name">{{currentDaycare.name}}</cover-view>
<cover-view class="detail-btn" @click="toDetail">查看详情</cover-view>
</cover-view>
<cover-view class="bottom-box">
<cover-view class="distance-text">{{currentDaycare.distanceStr || '-'}}</cover-view>
<cover-view class="line">|</cover-view>
<cover-view class="address-text">{{currentDaycare.address}}</cover-view>
</cover-view>
</cover-view>
</map>···

操作步骤:

直接初始化即可复现

预期结果:

透明度生效

实际结果:

16进制颜色值透明度不生效

bug描述:

uiapp map配置circles 其中fillColor 透明度#5DB9F91A 不生效

2025-09-03 13:54 负责人:无 分享
已邀请:
DCloud_UNI_JBB

DCloud_UNI_JBB

vue的版本是多少?地图厂商是哪个?

cxm151254182

cxm151254182 (作者)

<map  
        id="my_map"  
        :min-scale="4"  
        :max-scale="18"  
        :scale="14"  
        :circles="[{  
                    latitude: this.latitude,   
                    longitude: this.longitude,   
                    radius: 1200,   
                    color:'#5DB9F9FF',  
                    strokeWidth:1,  
                    fillColor: '#5DB9F91A'}]"  
        :latitude="latitude"  
        :longitude="longitude"  
         style="width:100%;"  
        :style="{'height':mapHeight}"   
        :show-location="true"  
        :markers="covers"  
        @markertap="markertapEvent">  
            <cover-view class="daycare-box" v-if="Object.keys(currentDaycare).length">  
                <cover-view class="top-box">  
                    <cover-view class="daycare-name">{{currentDaycare.name}}</cover-view>  
                    <cover-view class="detail-btn" @click="toDetail">查看详情</cover-view>  
                </cover-view>  
                <cover-view class="bottom-box">  
                    <cover-view class="distance-text">{{currentDaycare.distanceStr || '-'}}</cover-view>  
                    <cover-view class="line">|</cover-view>  
                    <cover-view class="address-text">{{currentDaycare.address}}</cover-view>  
                </cover-view>  
            </cover-view>  
        </map>
  • cxm151254182 (作者)

    这个是我这边使用地图得完整代码

    2025-09-03 15:03

  • cxm151254182 (作者)

    回复 cxm151254182: 我这边根据这个(https://ask.dcloud.net.cn/question/159809)替换了一下,现在是临时解决了但是,如果要发布到线上就没办法

    2025-09-03 15:30

要回复问题请先登录注册