Vue+Element sets the head to be fixed and solves the display problem of the mask layer

As you can see from the overall framework code, element-ui has already realized the fixed head . Find this fixedHeader and find that if it is set to false
insert image description here
directly in the global setting file , it means that the head is not fixed; if it is changed to true, it means the head
insert image description here
fixed.

After the above changes, the head can be fixed.
But I found that after I finished the modification, there is a problem with the display of the dialog that can be triggered by the head, and it will be blocked by the mask layer. As shown in the picture:
insert image description here
This may be because the z-index is changed after the head is fixed, and then there is a problem with the corresponding display. The
solution:
add it to the triggered el-dialog :append-to-body="true". The specific official explanation is as follows:
insert image description here
Then the display can be normal! !

おすすめ

転載: blog.csdn.net/changyana/article/details/131636023