antd modal 内容自动滚动

.container {
  width: 100%;
  height: 100%;

  & :global .ant-modal {
    height: 100%;
    overflow: hidden;
  }

  & :global .ant-modal-content {
    position: relative;
    display: flex;
    max-height: 100%;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    top: 50%;
    transform: translateY(-50%);
  }

  & :global .ant-modal-body {
    position: relative;
    display: flex;
    overflow: auto;
  }
}



   {/*  ...很长的元素 */}

你可能感兴趣的:(antd modal 内容自动滚动)