Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输出警告后导致vue3页面空白 #96

Open
TsMask opened this issue Feb 28, 2024 · 2 comments
Open

输出警告后导致vue3页面空白 #96

TsMask opened this issue Feb 28, 2024 · 2 comments

Comments

@TsMask
Copy link

TsMask commented Feb 28, 2024

image

能正常打开pdf显示到页面,控制台输出
Warning: TT: undefined function: 3
随后跳转到新的页面会导致空白,只能F5全局刷新解决

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
vue3.3
vite5

@TaTo30
Copy link
Owner

TaTo30 commented Feb 28, 2024

That warning is explained here: mozilla/pdf.js#3768 (comment)

If there are an issue with the rendering process attach the PDF.

@TaTo30 TaTo30 closed this as completed Feb 28, 2024
@TaTo30 TaTo30 reopened this Feb 28, 2024
@TsMask
Copy link
Author

TsMask commented Feb 29, 2024

使用wps生成的pdf

"vue": "~3.3.13",
"@tato30/vue-pdf": "^1.9.5",

"vite": "^5.1.4",
vite v5.1.4 building for production...
images/altText_add.svg referenced in C:/AMP/Probject/ems_frontend_vue3/node_modules/@tato30/vue-pdf/dist/style.css didn't resolve at build time, it will remain unchanged to be resolved at runtime

images/altText_done.svg referenced in C:/AMP/Probject/ems_frontend_vue3/node_modules/@tato30/vue-pdf/dist/style.css didn't resolve at build time, it will remain unchanged to be resolved at runtime

node_modules/pdfjs-dist/build/pdf.js (1982:23) Use of eval in "node_modules/pdfjs-dist/build/pdf.js" is strongly discouraged as it poses security risks and may cause issues with minification.

以上是打包后的提示信息

打包后dist目标部署nginx正常能显示pdf

控制台还是输出:Warning: TT: undefined function: 3

随后跳转到新页面也可以正常显示,就dev启动时才会有跳转新页面空白的情况

TestPDF.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants