|
|
@ -131,6 +131,7 @@ export function parse (template, options) { |
|
|
|
processIf(element) |
|
|
|
processRender(element) |
|
|
|
processSlot(element) |
|
|
|
processComponent(element) |
|
|
|
processClassBinding(element) |
|
|
|
processStyleBinding(element) |
|
|
|
processAttrs(element) |
|
|
@ -300,6 +301,15 @@ function processSlot (el) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function processComponent (el) { |
|
|
|
if (el.tag === 'component') { |
|
|
|
let staticName = getAndRemoveAttr(el, 'is') |
|
|
|
el.component = staticName |
|
|
|
? JSON.stringify(staticName) |
|
|
|
: (getAndRemoveAttr(el, ':is') || getAndRemoveAttr(el, 'v-bind:is')) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function processClassBinding (el) { |
|
|
|
const staticClass = getAndRemoveAttr(el, 'class') |
|
|
|
el.staticClass = parseText(staticClass) || JSON.stringify(staticClass) |
|
|
|