--- order: 999 title: zh-CN: 滚动锁定调试 en-US: Scroll Debug debug: true --- ## zh-CN 当 Modal 和 Drawer 共同作用时的滚动锁定调试。 ## en-US Scroll lock debug with Modal & Drawer. ```tsx import { Switch, Space, Drawer, Modal } from 'antd'; import React, { useState } from 'react'; const App: React.FC = () => { const [drawer, setDrawer] = useState(false); const [drawer2, setDrawer2] = useState(false); const [modal, setModal] = useState(false); const [modal2, setModal2] = useState(false); return (
setDrawer(!drawer)} /> setDrawer2(!drawer2)} /> setModal(!modal)} /> setModal2(!modal2)} /> Some contents... Sub contents... Some contents... Some contents... Some contents...
); }; export default App; ```