
element-ui el-table 树形结构子节点不能打勾
问题描述:
在 element-ui 的 el-table 树形结构中,点击子节点时,可以选中但不会出现打勾效果。
解决方案:
解决这个问题需要遵循以下步骤:
::v-deep .indeterminate .el-table-column--selection .cell .el-checkbox {
display: block !important;
}
::v-deep .indeterminate .el-checkbox__input .el-checkbox__inner {
background-color: #4a97eb !important;
border-color: #4a97eb !important;
color: #fff !important;
}
::v-deep .indeterminate .el-checkbox__input.is-checked .el-checkbox__inner::after {
transform: scale(0.5);
}
::v-deep .indeterminate .el-checkbox__input .el-checkbox__inner::after {
border-color: #c0c4cc !important;
background-color: #c0c4cc;
}
::v-deep .indeterminate .el-checkbox__input .el-checkbox__inner::after {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(0.5);
left: 0;
right: 0;
top: 5px;
width: auto !important;
}::v-deep .indeterminate {
background-color: #f5f5f5;
}问题补充:选中的节点中出现一半勾选的状态
如果选中行后出现一半勾选的状态,可以按以下步骤解决:
通过以上步骤,可以解决 el-table 树形结构子节点不能打勾以及选中节点出现一半勾选状态的问题。
以上就是Element-UI el-table 树形结构子节点无法打勾如何解决?的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号