UNPKG

vue

Version:

Reactive, component-oriented view layer for modern web interfaces.

22 lines (18 loc) 506 B
/* @flow */ function transformNode (el: ASTElement, options: CompilerOptions) { if (el.tag === 'cell' && !el.attrsList.some(item => item.name === 'append')) { el.attrsMap.append = 'tree' el.attrsList.push({ name: 'append', value: 'tree' }) } if (el.attrsMap.append === 'tree') { el.appendAsTree = true } } function genData (el: ASTElement): string { return el.appendAsTree ? `appendAsTree:true,` : '' } export default { staticKeys: ['appendAsTree'], transformNode, genData }