-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(table): fix table shouldUpdate #2848
fix(table): fix table shouldUpdate #2848
Conversation
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.
这种方法在某些情况下是可行的,当两个数组的元素顺序相同且元素都可以转换成字符串的情况下确实可行。
这样的代码存有隐患,比如数字被转换成字符串,数字“1”和字符串“1”会被认为相等,可能造成调试困难,不推荐使用。
还需要考虑顺序问题么,没仔细看,忘了 key 会有数字情况,以为都是字符串 |
看了下,应该不需要判断顺序问题,比如当前 ["1,""2"],去掉一个 “2” 已经 render 了,不可能一步直接到 ["2","1"] |
This pull request introduces 1 alert when merging a0f1139 into 92093fa - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #2848 /- ##
==========================================
- Coverage 99.07% 99.07% -0.01%
==========================================
Files 173 173
Lines 5271 5269 -2
Branches 1883 1882 -1
==========================================
- Hits 5222 5220 -2
Misses 48 48
Partials 1 1
Continue to review full report at Codecov.
|
数组不能直接对比,导致直接在这一步全部 return 了。