File tree Expand file tree Collapse file tree 3 files changed +19
-18
lines changed
src/core/instance/render-helpers Expand file tree Collapse file tree 3 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { checkKeyCodes } from './check-keycodes'
99import { bindObjectProps } from './bind-object-props'
1010import { renderStatic , markOnce } from './render-static'
1111import { bindObjectListeners } from './bind-object-listeners'
12- import { resolveScopedSlots } from './resolve-slots'
12+ import { resolveScopedSlots } from './resolve-scoped- slots'
1313import { bindDynamicKeys , prependModifier } from './bind-dynamic-keys'
1414
1515export function installRenderHelpers ( target : any ) {
Original file line number Diff line number Diff line change 1+ /* @flow */
2+
3+ export function resolveScopedSlots (
4+ fns : ScopedSlotsData , // see flow/vnode
5+ hasDynamicKeys ?: boolean ,
6+ res ?: Object
7+ ) : { [ key : string ] : Function , $stable : boolean } {
8+ res = res || { $stable : ! hasDynamicKeys }
9+ for ( let i = 0 ; i < fns . length ; i ++ ) {
10+ const slot = fns [ i ]
11+ if ( Array . isArray ( slot ) ) {
12+ resolveScopedSlots ( slot , hasDynamicKeys , res )
13+ } else if ( slot ) {
14+ res [ slot . key ] = slot . fn
15+ }
16+ }
17+ return res
18+ }
Original file line number Diff line number Diff line change @@ -48,20 +48,3 @@ export function resolveSlots (
4848function isWhitespace ( node : VNode ) : boolean {
4949 return ( node . isComment && ! node . asyncFactory ) || node . text === ' '
5050}
51-
52- export function resolveScopedSlots (
53- fns : ScopedSlotsData , // see flow/vnode
54- hasDynamicKeys ?: boolean ,
55- res ?: Object
56- ) : { [ key : string ] : Function , $stable : boolean } {
57- res = res || { $stable : ! hasDynamicKeys }
58- for ( let i = 0 ; i < fns . length ; i ++ ) {
59- const slot = fns [ i ]
60- if ( Array . isArray ( slot ) ) {
61- resolveScopedSlots ( slot , hasDynamicKeys , res )
62- } else if ( slot ) {
63- res [ slot . key ] = slot . fn
64- }
65- }
66- return res
67- }
You can’t perform that action at this time.
0 commit comments