·
import React, { FC } from 'react';

const Index: FC = () => {

  return (
    <div onClick={e => {
      e.stopPropagation();
      // do something
    }}/>
  );
};

stopPropagation 就行了