Showing
1 changed file
with
2 additions
and
2 deletions
| ... | ... | @@ -115,10 +115,10 @@ const FormSelectMain: React.FC<FormSelectProps>= (props)=> { |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | // 监听页面点击关闭操作 |
| 118 | - document.addEventListener('click', controlVisible); | |
| 118 | + document.addEventListener('click', controlVisible, true); | |
| 119 | 119 | |
| 120 | 120 | return () => { |
| 121 | - document.removeEventListener('click', controlVisible) | |
| 121 | + document.removeEventListener('click', controlVisible, true) | |
| 122 | 122 | } |
| 123 | 123 | }, []); |
| 124 | 124 | ... | ... |