File tree 1 file changed +5
-5
lines changed
src/platforms/weex/compiler/modules/recycle-list
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,11 @@ function getPrevMatch (el: ASTElement): any {
21
21
export function preTransformVIf ( el : ASTElement , options : CompilerOptions ) {
22
22
if ( hasConditionDirective ( el ) ) {
23
23
let exp
24
- const ifExp = getAndRemoveAttr ( el , 'v-if' )
25
- const elseifExp = getAndRemoveAttr ( el , 'v-else-if' )
24
+ const ifExp = getAndRemoveAttr ( el , 'v-if' , true /* remove from attrsMap */ )
25
+ const elseifExp = getAndRemoveAttr ( el , 'v-else-if' , true )
26
+ // don't need the value, but remove it to avoid being generated as a
27
+ // custom directive
28
+ getAndRemoveAttr ( el , 'v-else' , true )
26
29
if ( ifExp ) {
27
30
exp = ifExp
28
31
} else {
@@ -41,8 +44,5 @@ export function preTransformVIf (el: ASTElement, options: CompilerOptions) {
41
44
}
42
45
el . attrsMap [ '[[match]]' ] = exp
43
46
el . attrsList . push ( { name : '[[match]]' , value : exp } )
44
- delete el . attrsMap [ 'v-if' ]
45
- delete el . attrsMap [ 'v-else-if' ]
46
- delete el . attrsMap [ 'v-else' ]
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments