1
1
/* @flow */
2
2
3
+ import type { WeexCompilerOptions } from 'weex/compiler/index'
3
4
import { postTransformComponent } from './component'
4
5
import { postTransformText } from './text'
5
6
import { preTransformVBind } from './v-bind'
@@ -9,12 +10,12 @@ import { postTransformVOn } from './v-on'
9
10
10
11
let currentRecycleList = null
11
12
12
- function shouldCompile ( el : ASTElement , options : CompilerOptions ) {
13
+ function shouldCompile ( el : ASTElement , options : WeexCompilerOptions ) {
13
14
return options . recyclable ||
14
15
( currentRecycleList && el !== currentRecycleList )
15
16
}
16
17
17
- function preTransformNode ( el : ASTElement , options : CompilerOptions ) {
18
+ function preTransformNode ( el : ASTElement , options : WeexCompilerOptions ) {
18
19
if ( el . tag === 'recycle-list' ) {
19
20
currentRecycleList = el
20
21
}
@@ -25,13 +26,13 @@ function preTransformNode (el: ASTElement, options: CompilerOptions) {
25
26
}
26
27
}
27
28
28
- function transformNode ( el : ASTElement , options : CompilerOptions ) {
29
+ function transformNode ( el : ASTElement , options : WeexCompilerOptions ) {
29
30
if ( shouldCompile ( el , options ) ) {
30
31
// do nothing yet
31
32
}
32
33
}
33
34
34
- function postTransformNode ( el : ASTElement , options : CompilerOptions ) {
35
+ function postTransformNode ( el : ASTElement , options : WeexCompilerOptions ) {
35
36
if ( shouldCompile ( el , options ) ) {
36
37
postTransformComponent ( el , options )
37
38
// <text>: transform children text into value attr
0 commit comments