(el)
| 8547 | |
| 8548 | // v-once |
| 8549 | function genOnce (el) { |
| 8550 | el.onceProcessed = true; |
| 8551 | if (el.if && !el.ifProcessed) { |
| 8552 | return genIf(el) |
| 8553 | } else if (el.staticInFor) { |
| 8554 | var key = ''; |
| 8555 | var parent = el.parent; |
| 8556 | while (parent) { |
| 8557 | if (parent.for) { |
| 8558 | key = parent.key; |
| 8559 | break |
| 8560 | } |
| 8561 | parent = parent.parent; |
| 8562 | } |
| 8563 | if (!key) { |
| 8564 | process.env.NODE_ENV !== 'production' && warn$3( |
| 8565 | "v-once can only be used inside v-for that is keyed. " |
| 8566 | ); |
| 8567 | return genElement(el) |
| 8568 | } |
| 8569 | return ("_o(" + (genElement(el)) + "," + (onceCount++) + (key ? ("," + key) : "") + ")") |
| 8570 | } else { |
| 8571 | return genStatic(el) |
| 8572 | } |
| 8573 | } |
| 8574 | |
| 8575 | function genIf (el) { |
| 8576 | el.ifProcessed = true; // avoid recursion |
no test coverage detected