| 8688 | } |
| 8689 | |
| 8690 | function genDirectives (el) { |
| 8691 | var dirs = el.directives; |
| 8692 | if (!dirs) { return } |
| 8693 | var res = 'directives:['; |
| 8694 | var hasRuntime = false; |
| 8695 | var i, l, dir, needRuntime; |
| 8696 | for (i = 0, l = dirs.length; i < l; i++) { |
| 8697 | dir = dirs[i]; |
| 8698 | needRuntime = true; |
| 8699 | var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name]; |
| 8700 | if (gen) { |
| 8701 | // compile-time directive that manipulates AST. |
| 8702 | // returns true if it also needs a runtime counterpart. |
| 8703 | needRuntime = !!gen(el, dir, warn$3); |
| 8704 | } |
| 8705 | if (needRuntime) { |
| 8706 | hasRuntime = true; |
| 8707 | res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},"; |
| 8708 | } |
| 8709 | } |
| 8710 | if (hasRuntime) { |
| 8711 | return res.slice(0, -1) + ']' |
| 8712 | } |
| 8713 | } |
| 8714 | |
| 8715 | function genInlineTemplate (el) { |
| 8716 | var ast = el.children[0]; |