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