File tree 3 files changed +14
-12
lines changed
3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -372,16 +372,18 @@ export class STColumnSource {
372
372
}
373
373
const rawClassName = item . className ;
374
374
if ( ! rawClassName ) {
375
- builtInClassNames . push (
376
- (
377
- {
378
- number : 'text-right' ,
379
- currency : 'text-right' ,
380
- date : 'text-center'
381
- } as NzSafeAny
382
- ) [ item . type ! ]
383
- ) ;
384
- item . _className = builtInClassNames . filter ( w => ! ! w ) ;
375
+ const typeClass = (
376
+ {
377
+ number : 'text-right' ,
378
+ currency : 'text-right' ,
379
+ date : 'text-center'
380
+ } as NzSafeAny
381
+ ) [ item . type ! ] ;
382
+ if ( typeClass ) {
383
+ builtInClassNames . push ( typeClass ) ;
384
+ }
385
+ item . _className = builtInClassNames ;
386
+ item . _classNameInHeader = builtInClassNames ;
385
387
return ;
386
388
}
387
389
Original file line number Diff line number Diff line change 67
67
[nzWidth] ="$any(_c).width "
68
68
[nzLeft] ="_c._left! "
69
69
[nzRight] ="_c._right! "
70
- [ngClass] ="_c.className! "
71
- [class.text-truncate] ="_c._isTruncate "
70
+ [ngClass] ="_c._classNameInHeader "
72
71
[attr.data-col] ="_c.indexKey "
73
72
[attr.data-col-index] ="index "
74
73
[nzShowSort] ="_c._sort.enabled "
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export interface _STColumn extends STColumn {
34
34
* 校验需要未自定义 `className` 时应检查 `_isTruncate` 是否需要截短行为
35
35
*/
36
36
_className ?: string | string [ ] | Set < string > | { [ klass : string ] : any } | null ;
37
+ _classNameInHeader ?: string | string [ ] | Set < string > | { [ klass : string ] : any } | null | undefined ;
37
38
_sort : STSortMap ;
38
39
_width ?: number ;
39
40
_left ?: string | boolean ;
You can’t perform that action at this time.
0 commit comments