fix: 修复 #2372 在分页复选框表格中如果跳转到了第n页(n>1),则无法正确勾选默认选中的数据行#2387
Open
WHIPLASHCZ wants to merge 6 commits intox-extends:mainfrom
Open
fix: 修复 #2372 在分页复选框表格中如果跳转到了第n页(n>1),则无法正确勾选默认选中的数据行#2387WHIPLASHCZ wants to merge 6 commits intox-extends:mainfrom
WHIPLASHCZ wants to merge 6 commits intox-extends:mainfrom
Conversation
This was referenced May 10, 2024
Open
|
前端小白,遇到一个类似的问题,但对原因不太有头绪,想分享一下我的尝试。这个问题的背景是,在窗口中点击新增按钮,会出现一个包含复选框表格的抽屉,在这里选中的行会在点击确认后添加到窗口中。当首次打开窗口时,若窗口中已有条目,则此时再打开抽屉,对应的条目应该是默认勾选的状态。而问题就是,如果这是第一次打开抽屉,则无法选中对应的条目,需要先关闭抽屉,重新打开,才会勾选。为了在第一次打开就看到勾选的条目,我尝试在setTimeout或RAF中获取表格的模板引用,并做对应的勾选,则可以正确显示默认的勾选。而在nextTick之类的微任务中,则获取到的模板引用还是undefined。隐约感觉是组件挂载的时机问题,但是又想不明白到底是在哪个时刻触发的挂载。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.