mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-23 04:30:33 +03:00
Favor function syntax over per-attribute function syntax
This commit is contained in:
@@ -5,3 +5,13 @@
|
||||
<p>Inspect Element to see the meta info</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
metaInfo: {
|
||||
meta: [
|
||||
{ vmid: 'charset', charset: 'utf-8' }
|
||||
]
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
postsCount: 'publishedPostsCount'
|
||||
}),
|
||||
metaInfo: {
|
||||
title: 'Home'
|
||||
title: 'Home',
|
||||
meta: [
|
||||
{ vmid: 'description', name: 'description', content: 'The home page' }
|
||||
]
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -28,9 +28,12 @@
|
||||
'isLoading',
|
||||
'post'
|
||||
]),
|
||||
metaInfo: {
|
||||
title () {
|
||||
return this.isLoading ? 'Loading...' : this.post.title
|
||||
metaInfo () {
|
||||
return {
|
||||
title: this.isLoading ? 'Loading...' : this.post.title,
|
||||
meta: [
|
||||
{ vmid: 'description', name: 'description', content: this.post.title }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user