feature: tooltip in the checkbox

feature: add GridColumn.getElement
feature: column property of `contentWrap` and `maxLines`
change: line height from 24px to 18px
fix: adapt enabled after cell changed
fix: wrap issue of filter panel
This commit is contained in:
2024-03-07 12:54:00 +08:00
parent 6fb7c3c769
commit 168cae3ce1
8 changed files with 343 additions and 126 deletions

View File

@ -73,6 +73,15 @@ export class GridColumn {
* @virtual
*/
/**
* 获取用于判断文本大小的元素
* @method
* @name GridColumn.getElement
* @param {HTMLElement} element - 单元格主内容元素
* @returns {HTMLElement} 返回文本元素
* @virtual
*/
/**
* 获取编辑状态单元格值时调用的方法
* @method
@ -153,7 +162,7 @@ export class GridColumn {
/**
* @ignore
*/
static toString() { return '[object Column]' }
static toString() { return 'GridCommon' }
/**
* @ignore
@ -234,6 +243,11 @@ export class GridInputColumn extends GridColumn {
super.setEnabled(element, enabled);
element.disabled = enabled === false;
}
/**
* @ignore
*/
static toString() { return 'GridInput' }
}
/**
@ -280,6 +294,11 @@ export class GridTextColumn extends GridInputColumn {
// TODO: bad performance
}
}
/**
* @ignore
*/
static toString() { return 'GridText' }
}
const SymbolDropdown = Symbol.for('ui-dropdown');
@ -477,6 +496,11 @@ export class GridDropdownColumn extends GridColumn {
drop.onCollapsed();
}
}
/**
* @ignore
*/
static toString() { return 'GridDropdown' }
}
/**
@ -538,6 +562,11 @@ export class GridCheckboxColumn extends GridColumn {
super.setEnabled(element, enabled);
element.querySelector('input').disabled = enabled === false;
}
/**
* @ignore
*/
static toString() { return 'GridCheckbox' }
}
/**
@ -609,6 +638,11 @@ export class GridIconColumn extends GridColumn {
element.classList.remove('disabled');
}
}
/**
* @ignore
*/
static toString() { return 'GridIcon' }
}
/**
@ -700,4 +734,9 @@ export class GridDateColumn extends GridColumn {
static formatDate(date) {
return formatDate(date);
}
/**
* @ignore
*/
static toString() { return 'GridDate' }
}