From 3fd1b5982aec73380cbf83364a6e8ba1d756c42c Mon Sep 17 00:00:00 2001 From: Tsanie Date: Sun, 18 Feb 2024 14:17:15 +0800 Subject: [PATCH] add: grid.filterIcon --- lib/ui/grid/grid.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ui/grid/grid.js b/lib/ui/grid/grid.js index 33ea02c..19176c9 100644 --- a/lib/ui/grid/grid.js +++ b/lib/ui/grid/grid.js @@ -734,6 +734,12 @@ export class Grid { * @default 36 */ rowHeight = 36; + /** + * 列头过滤图标,旧版本样式(横着三个点)需修改为 `ellipsis-h` + * @type {string} + * @default filter + */ + filterIcon = 'filter'; /** * 文本行高 * @type {number} @@ -2051,7 +2057,7 @@ export class Grid { // filter if (col.allowFilter === true) { 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)); th.classList.add('header-filter'); th.appendChild(filter);