Vue-element-admin: 关于elementUI 使用Image组件双击图片会给body添加overflow: hidden;

Created on 31 Dec 2019  ·  7Comments  ·  Source: PanJiaChen/vue-element-admin

在使用该image组件时候,双击图片会导致给body添加overflow:hidden属性导致右侧滚动条隐藏无法滚动,关于这个想象官网element UI也有此状况,请问如何有其他方案避免双击图片隐藏滚动条,
此操作会导致无法滚动页面,只能F5刷新解决了

enhancement

Most helpful comment

暂时可以这样解决一下:

body {
        overflow: auto !important;
    }

All 7 comments

这个问题好像还会导致 和 iviewer 组件冲突,滚动条丢失

我今天也遇到这个问题了,官方好像没有解释

这个是BUG,绑定previewSrcList属性就好了,接收一个数组,开启大图预览以后 这个就没问题了。

但绑定previewSrcList属性后会触发点击开启大图预览,但心目中预期是不需要使用此功能点击不打开预览图。我也向Element ui 提出ISSUES,解决方案只能不使用此组件,等官方解决此bughttps://github.com/ElemeFE/element/issues/18567#issue-544128460

暂时可以这样解决一下:

body {
        overflow: auto !important;
    }

我单击都会出这问题!
用的el-card, 上半边图片下半边文本, 监听el-card的点击, 点下半部分文本没问题, 点上半部分图片就overflow:hidden, 然后失去滚动效果了...

目前只能照着楼上的方法解决...

更新, Element-ui的2.13.1版已经解决了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sunchenguang picture sunchenguang  ·  4Comments

gateslu picture gateslu  ·  4Comments

blueroseslol picture blueroseslol  ·  4Comments

nacimgoura picture nacimgoura  ·  3Comments

XiaoLizi29 picture XiaoLizi29  ·  3Comments