Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-amap CircleEditor active 失效 #250

Open
zxh0125 opened this issue Sep 29, 2021 · 1 comment
Open

react-amap CircleEditor active 失效 #250

zxh0125 opened this issue Sep 29, 2021 · 1 comment

Comments

@zxh0125
Copy link

zxh0125 commented Sep 29, 2021

我在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
Copy link
Author

zxh0125 commented Sep 29, 2021

版本 1.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant