vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
http://v2.vuejs.org
MIT License
208k stars 33.69k forks source link

enable `<template>` as component root element when it contains only one logical node #5758

Closed caikan closed 2 years ago

caikan commented 7 years ago

What problem does this feature solve?

From compiling template error message: Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead. But Cannot use