e1a1e7261031f76a8c394c0a5c650cfd992bf565bcaf88909850cdda5dee91db6f1c2c73d605968b79b70d173f58b0e63079194d08fb60267e19b97fb8d225 333 B

12345678910111213
  1. /* @flow */
  2. import { addAttr } from 'compiler/helpers'
  3. // mark component root nodes as
  4. export function postTransformComponentRoot (el: ASTElement) {
  5. if (!el.parent) {
  6. // component root
  7. addAttr(el, '@isComponentRoot', 'true')
  8. addAttr(el, '@templateId', '_uid')
  9. addAttr(el, '@componentProps', '$props || {}')
  10. }
  11. }