--- order: 7 title: zh-CN: 受控的预览 en-US: Controlled Preview --- ## zh-CN 可以使预览受控。 ## en-US You can make preview controlled. ```tsx import { Button, Image } from 'antd'; import React, { useState } from 'react'; const App: React.FC = () => { const [visible, setVisible] = useState(false); return ( <> { setVisible(value); }, }} /> ); }; export default App; ```