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

动态构建 tabs 的时候会报错 #28

Closed
microwin168 opened this issue Oct 10, 2018 · 7 comments
Closed

动态构建 tabs 的时候会报错 #28

microwin168 opened this issue Oct 10, 2018 · 7 comments

Comments

@microwin168
Copy link

microwin168 commented Oct 10, 2018

image

 <div *ngIf="homePageItem.length">
            <Tabs [activeTab]="index"
                  [page]="homePageItem.length"
                  (onChange)="onChange1($event)"
                  (onTabClick)="onTabClick($event)">
                <div *ngFor="let tabItem of homePageItem;">
                    <TabPane
                            style="display: flex; height: 150px; width: 100%; background-color: white;align-items: center;justify-content: center;"
                            [title]="tabItem.blockTitle">
                        <div>
                            Content of tab
                        </div>
                    </TabPane>
                </div>
            </Tabs>
        </div>

错误代码重现:
https://stackblitz.com/edit/ng-zorro-antd-mobile-start-9qcch6

@microwin168
Copy link
Author

image
出错后,内容会叠加显示。

@microwin168
Copy link
Author

microwin168 commented Oct 10, 2018

@cdllqos
Copy link

cdllqos commented Oct 10, 2018

@microwin168 do u have updated your demo?

@fisherspy
Copy link
Collaborator

fisherspy commented Oct 11, 2018

@microwin168 TabPane指定高度后没有发现内容重叠问题,请告知详细复现步骤。

@cdllqos
Copy link

cdllqos commented Oct 13, 2018

when create component in dynamic way, it'll behave like this.there is a issue about angular

@we125182
Copy link

@microwin168 请问后面有解决这个问题吗?我也有遇到一样的问题, 好像是动态创建的tabPane在渲染到dom后才更新了@translatePane的值, 导致了问题.

@fisherspy
Copy link
Collaborator

@fisherspy fisherspy reopened this Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants