修复 table 单元格多行展开风格,关闭展开状态时,表格行悬停状态类未移除的问题 (#1425)

This commit is contained in:
morning-star 2023-11-19 20:29:43 +08:00 committed by GitHub
parent c692abb707
commit d7cad19a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2537,7 +2537,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){
// 关闭展开状态
elemCellClose.on('click', function(){
var $this = $(this);
that.setRowActive(index, ELEM_EXPAND, true); // 移除单元格展开样式
that.setRowActive(index, [ELEM_EXPAND, ELEM_HOVER].join(' '), true); // 移除单元格展开样式
that.cssRules(key, function(item){
item.style.width = $this.data('cell-width'); // 恢复单元格展开前的宽度
that.resize(); // 滚动条补丁