js事件穿透如何实现?除了使用pointer-events:none
import React, { FC } from 'react'; const Index: FC = () => { return ( <div onClick={e => { e.stopPropagation(); // do something }}/> ); };
用 stopPropagation 就行了
stopPropagation
不理解问题,是点击穿透还是事件冒泡之类?