Commit 0834fefc authored by zhangwenshuai's avatar zhangwenshuai

点击链接阻止冒泡

parent faff2ae5
...@@ -43,11 +43,14 @@ export const ApolloTextLinkDetail = (props: any) => { ...@@ -43,11 +43,14 @@ export const ApolloTextLinkDetail = (props: any) => {
placement="left" placement="left"
overlayClassName={s.popContainer} overlayClassName={s.popContainer}
content={ content={
<div className={s.popContent} onClick={(e)=>{ <div
e.stopPropagation(); className={s.popContent}
e.nativeEvent.stopImmediatePropagation(); onClick={(e: any) => {
}}> e.stopPropagation();
{arr.map((item, i) => { e.nativeEvent.stopImmediatePropagation();
}}
>
{arr.map((item: any, i: number) => {
return ( return (
<a <a
key={i} key={i}
...@@ -64,8 +67,15 @@ export const ApolloTextLinkDetail = (props: any) => { ...@@ -64,8 +67,15 @@ export const ApolloTextLinkDetail = (props: any) => {
</div> </div>
} }
> >
<div className={s.content} style={innerStyle}> <div
{arr.map((item, i) => { className={s.content}
style={innerStyle}
onClick={(e: any) => {
e.stopPropagation();
e.nativeEvent.stopImmediatePropagation();
}}
>
{arr.map((item: any, i: number) => {
return ( return (
<a <a
key={i} key={i}
...@@ -82,8 +92,15 @@ export const ApolloTextLinkDetail = (props: any) => { ...@@ -82,8 +92,15 @@ export const ApolloTextLinkDetail = (props: any) => {
</div> </div>
</Popover> </Popover>
) : ( ) : (
<div className={s.content} style={innerStyle}> <div
{arr.map((item, i) => { className={s.content}
style={innerStyle}
onClick={(e: any) => {
e.stopPropagation();
e.nativeEvent.stopImmediatePropagation();
}}
>
{arr.map((item: any, i: number) => {
return ( return (
<a <a
key={i} key={i}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment