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

只有少部分Mac用户会出现点击展示的图片正确显示弹窗和toolbar,但是弹窗内没有图片,有遇到过这种情况的吗?可否给个排查的思路 #628

Open
baixjian opened this issue Mar 1, 2024 · 1 comment

Comments

@baixjian
Copy link

baixjian commented Mar 1, 2024

浏览器用Chrome Safair Edge 都是如此情况
Screenshots
image
image

import Viewer from 'viewerjs';

    const defaultBaseOption = {
        navbar: false,
        title: false,
        toolbar: {
            zoomIn: 4,
            zoomOut: 4,
            prev: 4,
            next: 4,
            reset: 4,
            oneToOne: 4
        }
    };
    document.querySelectorAll('.vp-doc img').forEach((item) => {

        item.onclick = () => {
            const viewer = new Viewer(item, {
                ...defaultBaseOption,
                ...option,
                hide(e) {
                    viewer.destroy();
                }
            });
            viewer.show();
        };
    });
`
@fengyuanchen
Copy link
Owner

建议关闭注销的 hide 钩子换成 hidden 钩子试试。

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

No branches or pull requests

2 participants