--- order: 3 title: zh-CN: 从浮层内关闭 en-US: Controlling the close of the dialog --- ## zh-CN 使用 `open` 属性控制浮层显示。 ## en-US Use `open` prop to control the display of the card. ```tsx import { Button, Popover } from 'antd'; import React, { useState } from 'react'; const App: React.FC = () => { const [open, setOpen] = useState(false); const hide = () => { setOpen(false); }; const handleOpenChange = (newOpen: boolean) => { setOpen(newOpen); }; return ( Close} title="Title" trigger="click" open={open} onOpenChange={handleOpenChange} > ); }; export default App; ```