File tree Expand file tree Collapse file tree 4 files changed +9
-18
lines changed
packages/compiler-vapor/src Expand file tree Collapse file tree 4 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
25
25
type VaporDirectiveNode ,
26
26
} from './ir'
27
27
import { isConstantExpression } from './utils'
28
- import { genDefaultDynamic } from './transforms/utils'
28
+ import { newDynamic } from './transforms/utils'
29
29
30
30
export type NodeTransform = (
31
31
node : RootNode | TemplateChildNode ,
@@ -174,7 +174,7 @@ export class TransformContext<T extends AllNode = AllNode> {
174
174
175
175
template : '' ,
176
176
childrenTemplate : [ ] ,
177
- dynamic : genDefaultDynamic ( ) ,
177
+ dynamic : newDynamic ( ) ,
178
178
} satisfies Partial < TransformContext < T > > )
179
179
}
180
180
}
@@ -217,9 +217,7 @@ export function transform(
217
217
block : {
218
218
type : IRNodeTypes . BLOCK ,
219
219
node : root ,
220
- dynamic : extend ( genDefaultDynamic ( ) , {
221
- flags : DynamicFlag . REFERENCED ,
222
- } satisfies Partial < IRDynamicInfo > ) ,
220
+ dynamic : newDynamic ( ) ,
223
221
effect : [ ] ,
224
222
operation : [ ] ,
225
223
returns : [ ] ,
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import {
11
11
import { extend } from '@vue/shared'
12
12
import { DynamicFlag , type IRDynamicInfo } from '../ir'
13
13
14
- export const genDefaultDynamic = ( ) : IRDynamicInfo => ( {
15
- flags : DynamicFlag . NONE ,
14
+ export const newDynamic = ( ) : IRDynamicInfo => ( {
15
+ flags : DynamicFlag . REFERENCED ,
16
16
children : [ ] ,
17
17
} )
18
18
Original file line number Diff line number Diff line change @@ -11,13 +11,11 @@ import {
11
11
import {
12
12
type BlockIRNode ,
13
13
DynamicFlag ,
14
- type IRDynamicInfo ,
15
14
IRNodeTypes ,
16
15
type VaporDirectiveNode ,
17
16
} from '../ir'
18
- import { extend } from '@vue/shared'
19
17
import { findProp , propToExpression } from '../utils'
20
- import { genDefaultDynamic , wrapTemplate } from './utils'
18
+ import { newDynamic , wrapTemplate } from './utils'
21
19
22
20
export const transformVFor = createStructuralDirectiveTransform (
23
21
'for' ,
@@ -53,9 +51,7 @@ export function processFor(
53
51
const render : BlockIRNode = {
54
52
type : IRNodeTypes . BLOCK ,
55
53
node,
56
- dynamic : extend ( genDefaultDynamic ( ) , {
57
- flags : DynamicFlag . REFERENCED ,
58
- } satisfies Partial < IRDynamicInfo > ) ,
54
+ dynamic : newDynamic ( ) ,
59
55
effect : [ ] ,
60
56
operation : [ ] ,
61
57
returns : [ ] ,
Original file line number Diff line number Diff line change @@ -11,12 +11,11 @@ import {
11
11
import {
12
12
type BlockIRNode ,
13
13
DynamicFlag ,
14
- type IRDynamicInfo ,
15
14
IRNodeTypes ,
16
15
type VaporDirectiveNode ,
17
16
} from '../ir'
18
17
import { extend } from '@vue/shared'
19
- import { genDefaultDynamic , wrapTemplate } from './utils'
18
+ import { newDynamic , wrapTemplate } from './utils'
20
19
import { getSiblingIf } from './transformComment'
21
20
22
21
export const transformVIf = createStructuralDirectiveTransform (
@@ -118,9 +117,7 @@ export function createIfBranch(
118
117
const branch : BlockIRNode = {
119
118
type : IRNodeTypes . BLOCK ,
120
119
node,
121
- dynamic : extend ( genDefaultDynamic ( ) , {
122
- flags : DynamicFlag . REFERENCED ,
123
- } satisfies Partial < IRDynamicInfo > ) ,
120
+ dynamic : newDynamic ( ) ,
124
121
effect : [ ] ,
125
122
operation : [ ] ,
126
123
returns : [ ] ,
You can’t perform that action at this time.
0 commit comments