File tree 3 files changed +19
-18
lines changed
src/core/instance/render-helpers
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'
9
9
import { bindObjectProps } from './bind-object-props'
10
10
import { renderStatic , markOnce } from './render-static'
11
11
import { bindObjectListeners } from './bind-object-listeners'
12
- import { resolveScopedSlots } from './resolve-slots'
12
+ import { resolveScopedSlots } from './resolve-scoped- slots'
13
13
import { bindDynamicKeys , prependModifier } from './bind-dynamic-keys'
14
14
15
15
export 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 (
48
48
function isWhitespace ( node : VNode ) : boolean {
49
49
return ( node . isComment && ! node . asyncFactory ) || node . text === ' '
50
50
}
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