Skip to content

Commit

Permalink
feat(ui/image-preview): Add an action to determine Scale in handleClo…
Browse files Browse the repository at this point in the history
…seClick function
  • Loading branch information
ahqrt authored and haoziqaq committed Jun 24, 2021
1 parent 2ee89a2 commit c0f159b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/varlet-ui/src/image-preview/ImagePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ export default defineComponent({
}
const handleCloseClick = () => {
zoomOut()
if (scale.value > 1) {
zoomOut()
}
setTimeout(() => props['onUpdate:show']?.(false), ANIMATION_DURATION)
}
Expand Down

0 comments on commit c0f159b

Please sign in to comment.