diff --git a/src/components/affix/nz-affix.component.ts b/src/components/affix/nz-affix.component.ts index d412d62195a..a94ce8c6543 100644 --- a/src/components/affix/nz-affix.component.ts +++ b/src/components/affix/nz-affix.component.ts @@ -97,7 +97,7 @@ export class NzAffixComponent implements OnChanges, OnInit, OnDestroy, AfterView const wrapEl = this.wrap.nativeElement; wrapEl.classList[ hasFixed ? 'add' : 'remove' ]('ant-affix'); if (hasFixed) { - wrapEl.style.cssText = `top:${this.nzOffsetTop + fixTop}px;left:${this.orgOffset.left}px`; + wrapEl.style.cssText = `top:${((+this.nzOffsetTop) + (+fixTop))}px;left:${this.orgOffset.left}px`; } else { wrapEl.style.cssText = ``; }