Commit Graph

17 Commits

Author SHA1 Message Date
Evan You c3c5dc93fb
fix(reactivity): fix tracking when hasOwnProperty is called with non-string value
close #10455
close #10464
2024-04-14 22:46:48 +08:00
三咲智子 Kevin Deng bfe6b459d3
style: update format & lint config (#9162)
Co-authored-by: 丶远方 <yangpanteng@gmail.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Guo Xingjun <99574369+Plumbiu@users.noreply.github.com>
2023-12-26 19:39:47 +08:00
Evan You 982a145d38 chore: Merge branch 'main' into minor 2023-12-11 22:03:28 +08:00
Evan You 6ecbd5ce2a fix(reactivity): fix mutation on user proxy of reactive Array
close #9742
close #9751
close #9750
2023-12-07 13:26:30 +08:00
Johnson Chu 16e06ca08f
feat(reactivity): more efficient reactivity system (#5912)
fix #311, fix #1811, fix #6018, fix #7160, fix #8714, fix #9149, fix #9419, fix #9464
2023-10-27 23:28:40 +09:00
丶远方 b01fc7ea84
chore: remove unnecessary imports (#8262) 2023-05-19 07:54:12 +08:00
Evan You 8867bb259a wip(vitest-migration): reactivity tests passing 2023-01-26 15:25:55 +08:00
8731852919
test(reactivity): Using toRaw on a raw Array (#7354) 2023-01-09 15:19:19 +01:00
HeYunfei b5b103a736
chore(types): delete @ts-ignore or use @ts-expected-error instead (#3669)
Co-authored-by: heyunfei.i <heyunfei.i@bytedance.com>
2022-05-11 20:40:59 -04:00
TheDro 1cfe290352
fix(reactivity): call array subclass methods (#3624)
fix #2314, close #2315
2021-07-15 17:17:13 -04:00
Evan You 0e5a3c47a7 fix(reactivity): track length on for in iteration on Array
fix #2427
2020-10-19 17:37:35 -04:00
Hefty 0d4910a211
fix(reactivity): add NaN prop on Array should not trigger length dependency. (#1998) 2020-09-14 20:40:09 -04:00
xxgjzftd d5c4f6ed4d
perf(reactivity): add existing index or non-integer prop on Array should not trigger length dependency (#1969) 2020-08-26 11:28:58 -04:00
HiiTea 22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -04:00
Evan You a3066581f3 fix(reactivity): should not trigger length dependency on Array delete
close #774
2020-03-06 11:31:10 -05:00
Evan You cc69fd72e3 fix(reactivity): Map/Set identity methods should work even if raw value contains reactive entries
fix #799
2020-03-06 11:10:02 -05:00
Evan You 775a7c2b41 refactor: preserve refs in reactive arrays
BREAKING CHANGE: reactive arrays no longer unwraps contained refs

    When reactive arrays contain refs, especially a mix of refs and
    plain values, Array prototype methods will fail to function
    properly - e.g. sort() or reverse() will overwrite the ref's value
    instead of moving it (see #737).

    Ensuring correct behavior for all possible Array methods while
    retaining the ref unwrapping behavior is exceedinly complicated; In
    addition, even if Vue handles the built-in methods internally, it
    would still break when the user attempts to use a 3rd party utility
    functioon (e.g. lodash) on a reactive array containing refs.

    After this commit, similar to other collection types like Map and
    Set, Arrays will no longer automatically unwrap contained refs.

    The usage of mixed refs and plain values in Arrays should be rare in
    practice. In cases where this is necessary, the user can create a
    computed property that performs the unwrapping.
2020-02-21 17:48:39 +01:00