elementUI dialog clicks on the page to jump

The reason is that when the dialog appears, the mask layer of the dialog blocks the scroll bar on the original page. It can be seen in the css that the original css

body{
    
    
padding-right:17px;
}

When the dialog appears, the scroll bar on the right side of the page will disappear, so that the page will jump, so the solution is to set the right padding of the body in the global css, so that it is 0 under any circumstances; Set as follows

body{
    
    
  padding-right:0!important;
  overflow: auto!important;
}

But the problem is that when the content of the dialog is too high and exceeds the height of the screen, the dialog will also have a scroll bar, as shown in the figure. I
Insert picture description here
don’t know the solution at this time, and experienced friends can guide you.

Guess you like

Origin blog.csdn.net/weixin_44994372/article/details/103509383