Skip to content

Commit 4b00b21

Browse files
authoredNov 24, 2022
fix(abc:st): fix shadow spacing in truncate (#1558)
1 parent 5a77920 commit 4b00b21

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎packages/abc/st/st.component.html

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
[nzLeft]="_c._left!"
6868
[nzRight]="_c._right!"
6969
[ngClass]="_c.className!"
70+
[class.text-truncate]="_c._isTruncate"
7071
[attr.data-col]="_c.indexKey"
7172
[attr.data-col-index]="index"
7273
[nzShowSort]="_c._sort.enabled"

‎packages/abc/st/style/index.less

+4-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@
139139
}
140140
}
141141
}
142-
// 修复无法显示阴影问题
143-
.@{ant-prefix}-table {
142+
// 若 `widthMode` 为 `truncate` 会导致固定列的阴影失效,其他情况不存在此情况
143+
// 这里使用 `text-truncate` 来区分
144+
// https://github.com/ng-alain/ng-alain/issues/2336
145+
.text-truncate.@{ant-prefix}-table {
144146
&-cell-fix-left-first::after,
145147
&-cell-fix-left-last::after {
146148
transform: translateX(80%);

‎packages/abc/st/test/st.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ describe('abc: st', () => {
14441444
.cd()
14451445
.updateColumn([{ title: '', index: 'id', width: 50, className: 'aaaa' }])
14461446
.expectElCount(`.st__width-strict`, 1)
1447-
.expectElCount(`.text-truncate`, context.comp._data.length)
1447+
.expectElCount(`td.text-truncate`, context.comp._data.length)
14481448
.expectElCount(`td.aaaa`, context.comp._data.length)
14491449
.asyncEnd();
14501450
}));

0 commit comments

Comments
 (0)
Please sign in to comment.