ElemeFE / react-amap

基于 React 封装的高德地图组件。AMap Component Based On React.
https://elemefe.github.io/react-amap/articles/start
MIT License
1.03k stars 151 forks source link

react-amap CircleEditor active 失效 #250

Open zxh0125 opened 3 years ago

zxh0125 commented 3 years ago

我在reaact map遍历显示Circle组件与 CircleEditor组件 代码如下:

{saveOrUpdateVO?.local_deliver_region_list?.map((region_list, index) => { console.log(index === local_deliver_index) return region_list?.region_type === 'RADIUS' ? ( <Circle key={index.toString()} bubble={false} center={markerCenter} radius={bignumber(Number(region_list?.region_radius 1000), 2)} visible={regionInfo?.active || false} style={AREACOLOR[index]} z-zIndex={index 10} draggable={false}

<CircleEditor events={index === local_deliver_index ? circleEvents(saveOrUpdateVO) : undefined} active={index === local_deliver_index} /> ) : ( <Polygon key={index.toString()} path={memoPolygonLongit(region_list.local_deliver_geo_list)} z-zIndex={index * 10} style={AREACOLOR[index]}> <PolyEditor active={index === local_deliver_index} events={polygonEvents} /> ) })}Ï 打印的active都是fasle。 具体需求。增加区域同时增加一个Circle组件。同时删除一个区域相对应Circle组件也删除。但是发现删除后CircleEditor还在。

zxh0125 commented 3 years ago

版本 1.2.8