File tree Expand file tree Collapse file tree 3 files changed +2
-34
lines changed
packages/compiler-vapor/src Expand file tree Collapse file tree 3 files changed +2
-34
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { genSetHtml } from './html'
13
13
import { genIf } from './if'
14
14
import { genDynamicProps , genSetProp } from './prop'
15
15
import { genDeclareOldRef , genSetTemplateRef } from './templateRef'
16
- import { genCreateTextNode , genGetTextChild , genSetText } from './text'
16
+ import { genGetTextChild , genSetText } from './text'
17
17
import {
18
18
type CodeFragment ,
19
19
INDENT_END ,
@@ -69,8 +69,6 @@ export function genOperation(
69
69
return genSetHtml ( oper , context )
70
70
case IRNodeTypes . SET_TEMPLATE_REF :
71
71
return genSetTemplateRef ( oper , context )
72
- case IRNodeTypes . CREATE_TEXT_NODE :
73
- return genCreateTextNode ( oper , context )
74
72
case IRNodeTypes . INSERT_NODE :
75
73
return genInsertNode ( oper , context )
76
74
case IRNodeTypes . PREPEND_NODE :
Original file line number Diff line number Diff line change 1
1
import type { SimpleExpressionNode } from '@vue/compiler-dom'
2
2
import type { CodegenContext } from '../generate'
3
- import type {
4
- CreateTextNodeIRNode ,
5
- GetTextChildIRNode ,
6
- SetTextIRNode ,
7
- } from '../ir'
3
+ import type { GetTextChildIRNode , SetTextIRNode } from '../ir'
8
4
import { getLiteralExpressionValue } from '../utils'
9
5
import { genExpression } from './expression'
10
6
import { type CodeFragment , NEWLINE , genCall } from './utils'
@@ -22,22 +18,6 @@ export function genSetText(
22
18
]
23
19
}
24
20
25
- export function genCreateTextNode (
26
- oper : CreateTextNodeIRNode ,
27
- context : CodegenContext ,
28
- ) : CodeFragment [ ] {
29
- const { helper } = context
30
- const { id, values, jsx } = oper
31
- return [
32
- NEWLINE ,
33
- `const n${ id } = ` ,
34
- ...genCall (
35
- helper ( 'createTextNode' ) ,
36
- values && combineValues ( values , context , jsx ) ,
37
- ) ,
38
- ]
39
- }
40
-
41
21
function combineValues (
42
22
values : SimpleExpressionNode [ ] ,
43
23
context : CodegenContext ,
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ export enum IRNodeTypes {
25
25
26
26
INSERT_NODE ,
27
27
PREPEND_NODE ,
28
- CREATE_TEXT_NODE ,
29
28
CREATE_COMPONENT_NODE ,
30
29
SLOT_OUTLET_NODE ,
31
30
@@ -162,14 +161,6 @@ export interface SetTemplateRefIRNode extends BaseIRNode {
162
161
effect : boolean
163
162
}
164
163
165
- // TODO remove, no longer needed
166
- export interface CreateTextNodeIRNode extends BaseIRNode {
167
- type : IRNodeTypes . CREATE_TEXT_NODE
168
- id : number
169
- values ?: SimpleExpressionNode [ ]
170
- jsx ?: boolean
171
- }
172
-
173
164
export interface InsertNodeIRNode extends BaseIRNode {
174
165
type : IRNodeTypes . INSERT_NODE
175
166
elements : number [ ]
@@ -236,7 +227,6 @@ export type OperationNode =
236
227
| SetDynamicEventsIRNode
237
228
| SetHtmlIRNode
238
229
| SetTemplateRefIRNode
239
- | CreateTextNodeIRNode
240
230
| InsertNodeIRNode
241
231
| PrependNodeIRNode
242
232
| DirectiveIRNode
You can’t perform that action at this time.
0 commit comments