1.下载包 yarn add react-pdf-js 2.使用 import PDF from 'react-pdf-js'; const [page, setPage] = useState(1); //pdf当前页数 const