We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9737d1b commit 052c53aCopy full SHA for 052c53a
src/platforms/web/compiler/modules/model.js
@@ -29,6 +29,7 @@ function preTransformNode (el: ASTElement, options: CompilerOptions) {
29
const typeBinding: any = getBindingAttr(el, 'type')
30
const ifCondition = getAndRemoveAttr(el, 'v-if', true)
31
const ifConditionExtra = ifCondition ? `&&(${ifCondition})` : ``
32
+ const hasElse = getAndRemoveAttr(el, 'v-else', true) != null
33
// 1. checkbox
34
const branch0 = cloneASTElement(el)
35
// process for on the main node
@@ -59,6 +60,11 @@ function preTransformNode (el: ASTElement, options: CompilerOptions) {
59
60
exp: ifCondition,
61
block: branch2
62
})
63
+
64
+ if (hasElse) {
65
+ branch0.else = true
66
+ }
67
68
return branch0
69
}
70
0 commit comments