add: grid.filterIcon
This commit is contained in:
parent
6dc9df8b17
commit
3fd1b5982a
@ -734,6 +734,12 @@ export class Grid {
|
|||||||
* @default 36
|
* @default 36
|
||||||
*/
|
*/
|
||||||
rowHeight = 36;
|
rowHeight = 36;
|
||||||
|
/**
|
||||||
|
* 列头过滤图标,旧版本样式(横着三个点)需修改为 `ellipsis-h`
|
||||||
|
* @type {string}
|
||||||
|
* @default filter
|
||||||
|
*/
|
||||||
|
filterIcon = 'filter';
|
||||||
/**
|
/**
|
||||||
* 文本行高
|
* 文本行高
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@ -2051,7 +2057,7 @@ export class Grid {
|
|||||||
// filter
|
// filter
|
||||||
if (col.allowFilter === true) {
|
if (col.allowFilter === true) {
|
||||||
const filter = createElement('layer', 'filter');
|
const filter = createElement('layer', 'filter');
|
||||||
filter.appendChild(createIcon('fa-solid', 'filter'));
|
filter.appendChild(createIcon('fa-solid', this.filterIcon));
|
||||||
filter.addEventListener('mousedown', e => this._onFilter(e, col));
|
filter.addEventListener('mousedown', e => this._onFilter(e, col));
|
||||||
th.classList.add('header-filter');
|
th.classList.add('header-filter');
|
||||||
th.appendChild(filter);
|
th.appendChild(filter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user