Showing
1 changed file
with
6 additions
and
1 deletions
| ... | ... | @@ -10,10 +10,14 @@ const pdfPreview = (props: pdfPreviewProps) => { |
| 10 | 10 | |
| 11 | 11 | useEffect(()=>{ |
| 12 | 12 | if (props.url) { |
| 13 | - setFilePath(props.url); | |
| 13 | + // const _url = encodeURIComponent(props.url); | |
| 14 | + const _url = props.url; | |
| 15 | + setFilePath(_url); | |
| 14 | 16 | } |
| 15 | 17 | },[props.url]) |
| 16 | 18 | |
| 19 | + // #viewerContainer margin-bottom: 0; | |
| 20 | + | |
| 17 | 21 | |
| 18 | 22 | return ( |
| 19 | 23 | <div className={'pdfPreview'}> |
| ... | ... | @@ -24,6 +28,7 @@ const pdfPreview = (props: pdfPreviewProps) => { |
| 24 | 28 | title="pdf-preview" |
| 25 | 29 | style={{ width: '100%', height: '100%' }} |
| 26 | 30 | src={`${filePath}#page=1&navpanes=0&scrollbars=0&toolbar=0&statusbar=0&view=FitH,top`} |
| 31 | + // src={`https://h5jianke.21tb.com/file/generic_mobile/web/viewer.html?file=${filePath}#page=1&navpanes=0&scrollbars=0&toolbar=0&statusbar=0&view=FitH,top`} | |
| 27 | 32 | /> |
| 28 | 33 | </div> |
| 29 | 34 | ); | ... | ... |