Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 1f24cde

Browse files
committed
drop
1 parent cec646b commit 1f24cde

File tree

5 files changed

+5
-19
lines changed

5 files changed

+5
-19
lines changed

packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function render(_ctx) {
7272
const n4 = t0()
7373
_renderEffect(() => _setText(n4, _ctx1[0].value+_ctx0[0].value))
7474
return n4
75-
}, null, null, n5)
75+
}, null, n5)
7676
_insert(n2, n5)
7777
return n5
7878
})

packages/compiler-vapor/__tests__/transforms/__snapshots__/vOnce.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export function render(_ctx) {
7171
const n0 = _createFor(() => (_ctx.list), (_ctx0) => {
7272
const n2 = t0()
7373
return n2
74-
}, null, null, null, null, true)
74+
}, null, null, null, true)
7575
return n0
7676
}"
7777
`;

packages/compiler-vapor/src/generators/for.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,8 @@ export function genFor(
1616
context: CodegenContext,
1717
): CodeFragment[] {
1818
const { vaporHelper } = context
19-
const {
20-
source,
21-
value,
22-
key,
23-
index,
24-
render,
25-
keyProp,
26-
once,
27-
id,
28-
memo,
29-
container,
30-
} = oper
19+
const { source, value, key, index, render, keyProp, once, id, container } =
20+
oper
3121

3222
let isDestructureAssignment = false
3323
let rawValue: string | null = null
@@ -71,7 +61,6 @@ export function genFor(
7161
sourceExpr,
7262
blockFn,
7363
genCallback(keyProp),
74-
genCallback(memo),
7564
container != null && `n${container}`,
7665
false, // todo: hydrationNode
7766
once && 'true',

packages/compiler-vapor/src/ir/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export interface IRFor {
7878
value?: SimpleExpressionNode
7979
key?: SimpleExpressionNode
8080
index?: SimpleExpressionNode
81-
memo?: SimpleExpressionNode
8281
}
8382

8483
export interface ForIRNode extends BaseIRNode, IRFor {

packages/compiler-vapor/src/transforms/vFor.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
IRNodeTypes,
1616
type VaporDirectiveNode,
1717
} from '../ir'
18-
import { findDir, findProp, propToExpression } from '../utils'
18+
import { findProp, propToExpression } from '../utils'
1919
import { newBlock, wrapTemplate } from './utils'
2020

2121
export const transformVFor: NodeTransform = createStructuralDirectiveTransform(
@@ -45,7 +45,6 @@ export function processFor(
4545
const { source, value, key, index } = parseResult
4646

4747
const keyProp = findProp(node, 'key')
48-
const memo = findDir(node, 'memo')
4948
const keyProperty = keyProp && propToExpression(keyProp)
5049
context.node = node = wrapTemplate(node, ['for'])
5150
context.dynamic.flags |= DynamicFlag.NON_TEMPLATE | DynamicFlag.INSERT
@@ -75,7 +74,6 @@ export function processFor(
7574
keyProp: keyProperty,
7675
render,
7776
once: context.inVOnce,
78-
memo: memo && memo.exp,
7977
container,
8078
})
8179
}

0 commit comments

Comments
 (0)