Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix some TS build issues in templates #2554

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { NzNotificationDataFilled } from './nz-notification.definitions';
templateUrl : './nz-notification-container.component.html'
})
export class NzNotificationContainerComponent extends NzMessageContainerComponent {
config: NzNotificationConfig = {};

constructor(
cdr: ChangeDetectorRef,
@Optional() @Inject(NZ_NOTIFICATION_DEFAULT_CONFIG) defaultConfig: NzNotificationConfig,
Expand Down
4 changes: 2 additions & 2 deletions components/notification/nz-notification.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="ant-notification-notice ant-notification-notice-closable"
[ngStyle]="nzMessage.options.nzStyle"
[ngClass]="nzMessage.options.nzClass"
[ngStyle]="nzMessage.options?.nzStyle"
[ngClass]="nzMessage.options?.nzClass"
[@enterLeave]="state"
(mouseenter)="onEnter()"
(mouseleave)="onLeave()">
Expand Down
4 changes: 2 additions & 2 deletions components/pagination/nz-pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class NzPaginationComponent implements OnInit, OnDestroy {
private _total: number;
private _pageIndex = 1;
firstIndex = 1;
pages = [];
pages: Array<{index: number}> = [];
@Input() nzShowTotal: TemplateRef<{ $implicit: number, range: [ number, number ] }>;
@Input() nzInTable = false;
@Input() nzSize: string;
Expand Down Expand Up @@ -231,7 +231,7 @@ export class NzPaginationComponent implements OnInit, OnDestroy {

/** generate indexes list */
buildIndexes(): void {
const tmpPages = [];
const tmpPages: Array<{index: number}> = [];
if (this.lastIndex <= 9) {
for (let i = 2; i <= this.lastIndex - 1; i++) {
tmpPages.push({ index: i });
Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-td.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(ngModelChange)="nzCheckedChange.emit($event)">
</label>
<span
*ngIf="!nzShowExpand && nzIndentSize != null"
*ngIf="!nzShowExpand && nzIndentSize >= 0"
class="ant-table-row-expand-icon ant-table-row-spaced"></span>
<span
*ngIf="nzShowExpand"
Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-th.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class NzThComponent {
singleFilterList: NzThItemInterface[] = [];
@ViewChild(NzDropDownComponent) nzDropDownComponent: NzDropDownComponent;
/* tslint:disable-next-line:no-any */
@Input() nzSelections: Array<{ text: string, onSelect: any }> = [];
@Input() nzSelections: Array<{ text: string, onSelect(): any }> = [];
@Input() nzChecked = false;
@Input() nzDisabled = false;
@Input() nzIndeterminate = false;
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/nz-tabset.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
[class.ant-tabs-right-content]="nzTabPosition === 'right'"
[class.ant-tabs-content-animated]="tabPaneAnimated"
[class.ant-tabs-content-no-animated]="!tabPaneAnimated"
[style.margin-left.%]="tabPaneAnimated && (-nzSelectedIndex*100)">
[style.margin-left.%]="tabPaneAnimated && (-(nzSelectedIndex || 0)*100)">
<div nz-tab-body
class="ant-tabs-tabpane"
*ngFor="let tab of listOfNzTabComponent; let i = index"
Expand Down
1 change: 1 addition & 0 deletions components/upload/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface UploadFile {
uid: string;
size: number;
name: string;
message?: string;
filename?: string;
lastModified?: string;
lastModifiedDate?: Date;
Expand Down