You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
333 B
13 lines
333 B
/* @flow */
|
|
|
|
import { addAttr } from 'compiler/helpers'
|
|
|
|
// mark component root nodes as
|
|
export function postTransformComponentRoot (el: ASTElement) {
|
|
if (!el.parent) {
|
|
// component root
|
|
addAttr(el, '@isComponentRoot', 'true')
|
|
addAttr(el, '@templateId', '_uid')
|
|
addAttr(el, '@componentProps', '$props || {}')
|
|
}
|
|
}
|
|
|