File tree 3 files changed +7
-1
lines changed
packages/runtime-core/src
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -553,6 +553,10 @@ export interface ComponentInternalInstance extends GenericComponentInstance {
553
553
* Render effect instance
554
554
*/
555
555
effect : ReactiveEffect
556
+ /**
557
+ * Force update render effect
558
+ */
559
+ update : ( ) => void
556
560
/**
557
561
* Render effect job to be passed to scheduler (checks if dirty)
558
562
*/
@@ -713,6 +717,7 @@ export function createComponentInstance(
713
717
next : null ,
714
718
subTree : null ! , // will be set synchronously right after creation
715
719
effect : null ! ,
720
+ update : null ! , // will be set synchronously right after creation
716
721
job : null ! ,
717
722
scope : new EffectScope ( true /* detached */ ) ,
718
723
render : null ,
Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ export const publicPropertiesMap: PublicPropertiesMap =
383
383
$forceUpdate : i =>
384
384
i . f ||
385
385
( i . f = ( ) => {
386
- queueJob ( ( ) => i . effect . run ( ) )
386
+ queueJob ( i . update )
387
387
} ) ,
388
388
$nextTick : i => i . n || ( i . n = nextTick . bind ( i . proxy ! ) ) ,
389
389
$watch : i => ( __FEATURE_OPTIONS_API__ ? instanceWatch . bind ( i ) : NOOP ) ,
Original file line number Diff line number Diff line change @@ -1672,6 +1672,7 @@ function baseCreateRenderer(
1672
1672
namespace ,
1673
1673
optimized ,
1674
1674
) )
1675
+ instance . update = effect . run . bind ( effect )
1675
1676
1676
1677
// allowRecurse
1677
1678
// #1801, #2043 component render effects should allow recursive updates
You can’t perform that action at this time.
0 commit comments