From 79390340d50d7ce5fb7698857be574df663b250b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A1=E8=89=B2?= Date: Mon, 18 Mar 2024 15:22:01 +0800 Subject: [PATCH] fix(abc:st): fix resizeable will trigger sorting or filter (#1788) --- 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 bc759ac901..7ae8f2b1d8 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 c277076128..1816576ee4 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 8a7e580418..89fe798974 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; } }