From f0bad26779f0a45023d7d584544a59baf910656a Mon Sep 17 00:00:00 2001 From: VTHINKXIE Date: Sat, 6 Jan 2018 10:58:50 +0800 Subject: [PATCH] fix(module:affix): fix affix nzOffsetTop bug (#868) --- src/components/affix/nz-affix.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = ``; }