-
Notifications
You must be signed in to change notification settings - Fork 199
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
docs: 修复导出组件示例报错 close #3059 #3063
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
你好 @lijinke666,非常感谢你的贡献. Hello, @lijinke666, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes. |
Walkthrough此PR修复了导出组件示例中的错误,主要通过在React组件中使用 Changes
|
@@ -9,6 +9,10 @@ order: 8 | |||
|
|||
对于使用 `React` 组件 `SheetComponent` 这一类场景,如果需要获取到 [表格实例](/api/basic-class/spreadsheet),进行一些进阶操作时,可以使用 `React.useRef` 和 `onMounted` 进行获取。 | |||
|
|||
:::info{title="注意"} | |||
表格是异步渲染,需要在 `onMounted` 后才能拿到最新的实例。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确保在onMounted
中获取实例时,组件的生命周期已经准备好,以避免潜在的异步问题。
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #3063 +/- ##
==========================================
Coverage 75.77% 75.77%
==========================================
Files 257 51 -206
Lines 11994 1490 -10504
Branches 2464 284 -2180
==========================================
- Hits 9088 1129 -7959
+ Misses 1398 210 -1188
+ Partials 1508 151 -1357 ☔ View full report in Codecov by Sentry. |
Size Change: 0 B Total Size: 619 kB ℹ️ View Unchanged
|
👀 PR includes
🔧 Chore
📝 Description
close #3059
🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge