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

nzWidth invalid in nz-th #302

Closed
cipchk opened this issue Sep 15, 2017 · 6 comments · Fixed by #349
Closed

nzWidth invalid in nz-th #302

cipchk opened this issue Sep 15, 2017 · 6 comments · Fixed by #349
Assignees
Labels

Comments

@cipchk
Copy link
Member

cipchk commented Sep 15, 2017

I'm submitting a...


[x] Bug report  

Current behavior

the html:

<th nz-th [nzWidth]="45"></th>

screenshot:

tim 20170915171445

@vthinkxie
Copy link
Member

please read the doc again. 45px not 45

@cipchk
Copy link
Member Author

cipchk commented Sep 15, 2017

all the same, when 45px

the html:

<th nz-th [nzWidth]="'45px'"></th>

screenshot:

2

@cipchk
Copy link
Member Author

cipchk commented Sep 15, 2017

the source no process in any binding action!

@vthinkxie
Copy link
Member

vthinkxie commented Sep 15, 2017

@cipchk https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/src/components/table/nz-table.component.ts#L48
th width is work with col width and min-width, you can check your html code

@cipchk
Copy link
Member Author

cipchk commented Sep 15, 2017

I found the reason!!

the html:

<th nz-th><span>标题</span></th>
<th nz-th *ngIf="s.need_sku"><span>SKU编号</span></th>
<th nz-th><span>状态</span></th>
<th nz-th [nzWidth]="'120px'"><span>修改时间</span></th>
<th nz-th [nzWidth]="'60px'"></th>

but, what generate wrong position style when need_sku=true, that influenced by the ngIf.

111

@lock
Copy link

lock bot commented Feb 19, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants