X.L
085d188379
fix(compiler): Remove the warning for valid v-slot value ( #9917 )
6 years ago
Alexander Schwartz
02d21c265c
fix(core): cleanup timeouts for async components ( #9649 )
close #9648
6 years ago
Evan You
ebc1893fac
fix(slots): fix slots not updating when passing down normal slots as $scopedSlots
fix #9699
6 years ago
Evan You
781c70514e
fix: should use fallback for scoped slots with single falsy v-if
fix #9658
6 years ago
Evan You
9313cf9174
fix: should consider presence of normal slots when caching normalized scoped slots
fix #9644
6 years ago
Evan You
d9b27a92bd
fix: ensure scoped slots update in conditional branches
close #9534
6 years ago
Evan You
8f004ea44e
fix: scoped slots should update when inside v-for
fix #9506
6 years ago
Evan You
21fca2fffc
fix: ensure scoped slot containing passed down slot content updates properly
6 years ago
Evan You
e7d49cdcf2
fix: allow passing multiple arguments to scoped slot
fix #9468
Note: the usage is NOT recommended
6 years ago
Evan You
060686d6ea
fix: do not cache scoped slots when mixed with normal slots
6 years ago
Evan You
8a800867fe
fix: new syntax slots without scope should also be exposed on functional slots()
6 years ago
Evan You
0e8560d0fc
fix: expose v-slot slots without scope on this.$slots
fix #9421 , fix #9458
6 years ago
Evan You
57bc80a546
fix: empty scoped slot should return undefined
fix #9452
6 years ago
Evan You
d5ade28652
revert: feat: expose all scoped slots on this.$slots
This reverts commit 0129b0eb12
.
6 years ago
Evan You
96a09aad99
fix(compiler): fix v-bind dynamic arguments on slot outlets
fix #9444
6 years ago
Evan You
4d4d22a3f6
fix: bail out scoped slot optimization when there are nested scopes
fix #9438
6 years ago
Evan You
24b4640c1f
fix: avoid exposing internal flags on $scopedSlots
ref #9443
6 years ago
Evan You
b9de23b100
fix: async component should use render owner as force update context
Previously, an async component uses its lexical owner as the force
update context. This works when the async component is rendered in a
scoped slot because in the past parent components always force update
child components with any type of slots. After the optimization in
f219bed though, child components with only scoped slots are no longer
force-updated, and this cause async components inside scoped slots to
not trigger the proper update. Turns out they should have used the
actual render owner (the component that invokes the scoped slot) as the
force update context all along.
fix #9432
6 years ago
Evan You
44a4ca33b9
fix: restore slot-scope + v-if behavior
fix #9422
6 years ago
Evan You
0129b0eb12
feat: expose all scoped slots on this.$slots
close #9421
6 years ago
Evan You
3edb999200
polish: warn against incorrect nested v-slot usage
6 years ago
Evan You
2807fd24b0
fix: template v-slot should work with v-else conditions
6 years ago
Evan You
f219bedae8
perf: improve scoped slots change detection accuracy ( #9371 )
Ensure that state mutations that only affect parent scope only trigger parent update and does not affect child components with only scoped slots.
6 years ago
Evan You
8cb2069aa4
test: fix tests in IE/Edge
6 years ago
Evan You
8d8457246d
feat: warning for ambiguous v-slot usage
6 years ago
Evan You
67e85deae2
feat: adjust v-slot per RFC + enable flag
6 years ago
Evan You
4fca0454bd
feat: update new slot syntax per RFC revision
6 years ago
Evan You
7fb6fdd168
build: introduce feature flags, hide new slot syntax behind flag
6 years ago
Evan You
c5c354d593
feat: new scoped slot syntax implementation update per rfc
6 years ago
Evan You
584e89da4a
feat: support slot-props and its shorthand
See https://github.com/vuejs/vue/issues/9306 for more details.
6 years ago
Evan You
794ad0dae3
refactor: additional tweaks after revert
6 years ago
Evan You
6a2994e8f0
revert: feat: support scoped-slot usage with $slot
This reverts commit 7988a5541c
.
6 years ago
Evan You
d855027741
test: more test cases for $slot usage detection
6 years ago
Evan You
1e5174d213
test: add more test case for watch option
6 years ago
Evan You
5d52262f1c
feat(core): expose all slots on $scopedSlots as functions
After this change, users using render functions can always make use
of slots via `this.$scopedSlots` without worrying about whether the
slot is being passed in as scoped or not.
This should also make it easier to migrate to 3.0 where all slots are
exposed as functions that return Array of VNodes on `this.$slots`.
6 years ago
Evan You
7988a5541c
feat: support scoped-slot usage with $slot
6 years ago
Evan You
c7c13c2a15
fix(scoped-slots): ensure $scopedSlots calls always return Arrays
Also allow render functions to return an Array of a single element.
Close #8056
6 years ago
Evan You
b7f7f27569
feat: use event delegation when possible
This also fixes async edge case #6566 where events propagate too slow
and incorrectly trigger handlers post-patch.
6 years ago
Evan You
530ca1b2db
fix(core): properly handle reused vnodes
This also removes the restrictions on rendering the same slot multiple
times.
close #7913
6 years ago
Evan You
097f6229df
fix(core): avoid mutating original children when cloning vnode
The on-demand clone strategy introduced in 956756b mutates the owner
array of the cloned vnode. This causes the newly cloned vnode to be
destroyed when the parent node is destroyed. This is fixed by cloning
the children array when cloning a vnode.
fix #7975
6 years ago
Sam Lichlyter
5489339a30
refactor(core): Replace "var" ( #8299 )
Replaces instances of "var" with "let" and "const" where applicable using the eslint 'no-var' and
'prefer-const' rules
6 years ago
Evan You
62a922e865
fix: fix wrongly matched named slots in functional components
This is a subtle edge case caused when a stateful component triggers
a self re-render, which reuses cached slot nodes. The cached slot
nodes, if returned from a functional render fn, gets the fnContext
property which causes subsequent slot resolving to not function
properly. To fix this, nodes returned from functional components
need to be cloned before getting assigned fnContext.
fix #7817
7 years ago
Evan You
6dd73e9ee4
fix: named slots for nested functional components
Named slots should be respecred when passing raw children down multiple
layers of functional components.
fix #7710
7 years ago
Evan You
215f877d1b
fix(keep-alive): run prune after render for correct active component check
fix #7566
7 years ago
Evan You
4e00688e4a
build: update dev dependencies
7 years ago
laoxiong
023f171f58
fix(core): warn duplicate keys in all cases ( #7200 )
close #7199
7 years ago
Evan You
dd21eacc33
fix: fix async component resolving in sibling mounted hook
fix #7107
7 years ago
Evan You
604e081d04
fix: ensure functionalContext is cloned during slot clones
fix #7106
7 years ago
Evan You
3932a451a1
fix(keep-alive): should not destroy active instance when pruning cache
fix #7105
7 years ago
Evan You
a23b913796
fix: fix <keep-alive> include/exclude logic for anonymous components
7 years ago