fix(ImagePreview): fit orientationchange (#6825)

* fix(ImagePreview): fit orientationchange

* chore: remove log
This commit is contained in:
neverland 2020-07-20 22:41:26 +08:00 committed by GitHub
parent 96f3e90ff3
commit ebb964aed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ export default createComponent({
}),
BindEventMixin(function (bind) {
bind(window, 'resize', this.resize, true);
bind(window, 'orientationchange', this.resize, true);
}),
],

View File

@ -18,6 +18,7 @@ export default createComponent({
ParentMixin('vanSwipe'),
BindEventMixin(function (bind, isBind) {
bind(window, 'resize', this.resize, true);
bind(window, 'orientationchange', this.resize, true);
bind(window, 'visibilitychange', this.onVisibilityChange);
if (isBind) {