mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
fix(ImagePreview): fit orientationchange (#6825)
* fix(ImagePreview): fit orientationchange * chore: remove log
This commit is contained in:
@@ -20,6 +20,7 @@ export default createComponent({
|
|||||||
}),
|
}),
|
||||||
BindEventMixin(function (bind) {
|
BindEventMixin(function (bind) {
|
||||||
bind(window, 'resize', this.resize, true);
|
bind(window, 'resize', this.resize, true);
|
||||||
|
bind(window, 'orientationchange', this.resize, true);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@ export default createComponent({
|
|||||||
ParentMixin('vanSwipe'),
|
ParentMixin('vanSwipe'),
|
||||||
BindEventMixin(function (bind, isBind) {
|
BindEventMixin(function (bind, isBind) {
|
||||||
bind(window, 'resize', this.resize, true);
|
bind(window, 'resize', this.resize, true);
|
||||||
|
bind(window, 'orientationchange', this.resize, true);
|
||||||
bind(window, 'visibilitychange', this.onVisibilityChange);
|
bind(window, 'visibilitychange', this.onVisibilityChange);
|
||||||
|
|
||||||
if (isBind) {
|
if (isBind) {
|
||||||
|
Reference in New Issue
Block a user