From dcd0924eab257d5c909f97f8e11884f1bc5cc361 Mon Sep 17 00:00:00 2001 From: cipchk Date: Mon, 18 Mar 2024 15:03:48 +0800 Subject: [PATCH] fix(abc:st): fix resizeable will trigger sorting or filter - close https://github.com/ng-alain/ng-alain/issues/2493 --- packages/abc/st/demo/resizable.md | 2 ++ packages/abc/st/st.component.html | 2 +- packages/abc/st/style/index.less | 25 +------------------------ 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/packages/abc/st/demo/resizable.md b/packages/abc/st/demo/resizable.md index bc759ac90..7ae8f2b1d 100644 --- a/packages/abc/st/demo/resizable.md +++ b/packages/abc/st/demo/resizable.md @@ -11,6 +11,7 @@ title: > - 注意:不要忘记在 `src/styles` 下导入 `nz-resizable` Less 样式文件(`@import 'ng-zorro-antd/resizable/style/entry.less';`) > - **不支持多表头** +> - 当与过滤、排序一同存在时调整手柄会变小 ## en-US @@ -18,6 +19,7 @@ Resize the table header base on [nz-resizable](https://ng.ant.design/experimenta > - Note: Don't forget to import the `nz-resizable` Less style (`@import 'ng-zorro-antd/resizable/style/entry.less';`) file in `src/styles`. > - **Multiple headers not supported** +> - Adjustment handles will become smaller when present with filtering and sorting ```ts import { Component } from '@angular/core'; diff --git a/packages/abc/st/st.component.html b/packages/abc/st/st.component.html index c27707612..1816576ee 100644 --- a/packages/abc/st/st.component.html +++ b/packages/abc/st/st.component.html @@ -85,7 +85,7 @@ (nzResizeEnd)="colResize($event, _c)" > @if ($any(!last && !$any(_c).resizable.disabled)) { - + } diff --git a/packages/abc/st/style/index.less b/packages/abc/st/style/index.less index 8a7e58041..89fe79897 100644 --- a/packages/abc/st/style/index.less +++ b/packages/abc/st/style/index.less @@ -81,31 +81,8 @@ } // Title &__has-filter { - @st-th-icon-width: 12px; - @st-filter-and-sort-gutter: 4px; - @st-filter-icon-size: @st-th-icon-width + @st-filter-and-sort-gutter; - @st-sort-size: @st-th-icon-width + @st-filter-and-sort-gutter; - - .@{ant-prefix}-table-column-sorters { - padding-right: @st-filter-icon-size; - } @{st-prefix}__filter { - position: absolute; - top: 0; - right: 0; - bottom: 0; - display: flex; - place-items: center center; - } - - .@{ant-prefix}-table-filter-trigger { - height: 100%; - } - - &.@{ant-prefix}-table-column-has-sorters { - @{st-prefix}__filter { - right: -(@st-sort-size + @st-filter-icon-size); - } + display: inline-flex; } }