From b80a5275194c0083348c88f8e8ce9fdc4d538ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=A7=E8=A1=A1?= Date: Sat, 6 Jan 2018 10:41:18 +0800 Subject: [PATCH] fix(module:affix): fix affix nzOffsetTop bug --- 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 d412d62195..a94ce8c654 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 = ``; }