-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
template-compiler throw
template syntax error Component template should contain exactly one root element:
while use vue-loader in webpack@2.x after I upgrade vue@2.1.0 today.
here's my template in vue component:
<div class="j-title">
<template v-if="status.isView">
<div @pointerup="setEdit" class="title">{{journey.title}}</div>
<div @pointerup="setEdit" v-if="author" class="author">{{author.name}}</div>
</template>
<template v-else>
<textarea v-autosize placeholder="title here" v-model="journey.title" rows="1"></textarea>
<div class="author flex flex-center"><input class="flex-1" placeholder="insert your name" v-model="author.name"></div>
</template>
</div>
exactly the component only contain one root element and i really don't know what's wrong with it
Vue.js version
2.1.0
Demo
here's my simple demo
https://github.com/shjyh/vue_error_demo
kafura, devfake, bartlomieju, windid, JounQin and 2 more