Removed unnecessary <template> element

Vue.js uses `<template>` when we don't want to output an element but still
want to set some attributes (like `v-if`) on a piece of text. Since we're
outputting a `<span>`, we can just move the attributes there.
This commit is contained in:
Sybren A. Stüvel 2019-03-28 16:40:01 +01:00
parent 1fd17303a5
commit 48cb216c4a

View File

@ -3,7 +3,7 @@ const TEMPLATE = `
<ul>
<li v-for="crumb in breadcrumbs">
<a :href="crumb.url" v-if="!crumb._self" @click.prevent="navigateToNode(crumb._id)">{{ crumb.name }}</a>
<template v-else><span>{{ crumb.name }}</span></template>
<span v-else>{{ crumb.name }}</span>
</li>
</ul>
</div>