Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
在表单表格(
MFormTable)开启全屏编辑后,若行内为 下拉框(Select) 等依赖浮层的控件,展开选项时,选项会被全屏半透明遮罩挡住,无法正常点选。原因说明
全屏时外层容器使用了:
:style="isFullscreen ? `z-index: ${nextZIndex()}` : ''"nextZIndex()写在模板表达式中,在全屏开启期间,组件每次重新渲染(如输入、增删行、表格数据更新等)都会再次执行,导致全局z-index不断累加,全屏层最终可能高于下拉浮层(如 Element Plus 默认约 2000),从而遮挡选项。修改说明
ref保存进入全屏时只计算一次的z-index。watch(isFullscreen):进入全屏时调用nextZIndex()并赋值,退出全屏时清空。:style改为绑定computed,仅使用上述稳定值,避免在渲染路径中重复产生副作用。fix: #672