File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ export class EffectScope {
62
62
}
63
63
}
64
64
65
+ prevScope : EffectScope | undefined
65
66
/**
66
67
* This should only be called on non-detached scopes
67
68
* @internal
68
69
*/
69
70
on ( ) {
71
+ this . prevScope = activeEffectScope
70
72
activeEffectScope = this
71
73
}
72
74
@@ -75,7 +77,7 @@ export class EffectScope {
75
77
* @internal
76
78
*/
77
79
off ( ) {
78
- activeEffectScope = this . parent
80
+ activeEffectScope = this . prevScope
79
81
}
80
82
81
83
stop ( fromParent ?: boolean ) {
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ export default defineComponent({
23
23
const container = document . createElement ( 'li' )
24
24
append ( container , node )
25
25
26
- const update = ( ) => {
26
+ renderEffect ( ( ) => {
27
27
const [ item , index ] = block . s
28
28
node . textContent = `${ index } . ${ item } `
29
- }
30
- renderEffect ( update )
31
- return [ container , update ]
29
+ } )
30
+
31
+ renderEffect ( ( ) => {
32
+ const [ item , index ] = block . s
33
+ node . textContent = `${ index } / ${ item } `
34
+ } )
35
+ return container
32
36
} ,
33
37
( item , index ) => index ,
34
38
)
You can’t perform that action at this time.
0 commit comments