|
|
@@ -1,6 +1,7 @@
|
|
|
/* @flow */
|
|
|
|
|
|
-import { postTransformComponent } from './component'
|
|
|
+import { preTransformComponent } from './component'
|
|
|
+import { preTransformComponentRoot } from './component-root'
|
|
|
import { postTransformText } from './text'
|
|
|
import { preTransformVBind } from './v-bind'
|
|
|
import { preTransformVIf } from './v-if'
|
|
|
@@ -19,6 +20,8 @@ function preTransformNode (el: ASTElement, options: WeexCompilerOptions) {
|
|
|
currentRecycleList = el
|
|
|
}
|
|
|
if (shouldCompile(el, options)) {
|
|
|
+ preTransformComponent(el, options)
|
|
|
+ preTransformComponentRoot(el, options)
|
|
|
preTransformVBind(el, options)
|
|
|
preTransformVIf(el, options) // also v-else-if and v-else
|
|
|
preTransformVFor(el, options)
|
|
|
@@ -33,7 +36,6 @@ function transformNode (el: ASTElement, options: WeexCompilerOptions) {
|
|
|
|
|
|
function postTransformNode (el: ASTElement, options: WeexCompilerOptions) {
|
|
|
if (shouldCompile(el, options)) {
|
|
|
- postTransformComponent(el, options)
|
|
|
// <text>: transform children text into value attr
|
|
|
if (el.tag === 'text') {
|
|
|
postTransformText(el, options)
|