riku
2025-04-27 f46786f11c5c08ead7501a82e5a71430ad69b782
miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.js
@@ -91,12 +91,21 @@
                        },
                    };
                }
                const scaledHeight = ratio * windowHeight * 2;
                if (scaledHeight < windowWidth) {
                    return {
                        styleObj: {
                            width: `${scaledHeight}rpx`,
                            height: '100vh',
                            left: '50%',
                            transform: 'translate(-50%, -50%)',
                        },
                    };
                }
                return {
                    styleObj: {
                        width: `${ratio * windowHeight * 2}rpx`,
                        height: '100vh',
                        left: '50%',
                        transform: 'translate(-50%, -50%)',
                        width: '100vw',
                        height: `${(windowWidth / imageWidth) * imageHeight * 2}rpx`,
                    },
                };
            },