You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

967 B

order title debug
3 [{zh-CN 自动调整位置} {en-US Adjust placement automatically}] true

zh-CN

气泡框不可见时自动调整位置

en-US

Adjust placement automatically when tooltip is invisible.

import { Button, Tooltip } from 'antd';
import React from 'react';

const wrapStyles: React.CSSProperties = {
  overflow: 'hidden',
  position: 'relative',
  padding: '24px',
  border: '1px solid #e9e9e9',
};

const App: React.FC = () => (
  <div style={wrapStyles}>
    <Tooltip
      placement="left"
      title="Prompt Text"
      getPopupContainer={trigger => trigger.parentElement!}
    >
      <Button>Adjust automatically / 自动调整</Button>
    </Tooltip>
    <br />
    <Tooltip
      placement="left"
      title="Prompt Text"
      getPopupContainer={trigger => trigger.parentElement!}
      autoAdjustOverflow={false}
    >
      <Button>Ignore / 不处理</Button>
    </Tooltip>
  </div>
);

export default App;