Skip to content

fix(grid-view): 修改mounted生命周期钩子以异步等待DOM渲染完成#1326

Open
YufJi wants to merge 1 commit intotestfrom
fix/grid-view-init-width
Open

fix(grid-view): 修改mounted生命周期钩子以异步等待DOM渲染完成#1326
YufJi wants to merge 1 commit intotestfrom
fix/grid-view-init-width

Conversation

@YufJi
Copy link
Copy Markdown
Contributor

@YufJi YufJi commented Jan 20, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a timing issue in the grid-view component by ensuring DOM is fully rendered before width calculations are performed. The mounted lifecycle hook is made async and waits for the next tick before initializing the grid layout.

Changes:

  • Modified the mounted() lifecycle hook to be async and added await this.$nextTick() before layout initialization
  • This ensures DOM is fully rendered before width calculations occur, preventing potential layout issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

2 participants