2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-05-17 14:49:37 +03:00
Files
2019-03-11 10:47:44 +01:00

33 lines
504 B
JavaScript

import Vue from 'vue'
import VueMeta from 'vue-meta'
Vue.use(VueMeta)
Vue.component('child', {
name: 'Child',
props: {
page: {
type: String,
default: ''
}
},
render(h) {
return h('h3', null, this.page)
},
metaInfo() {
return {
title: this.page
}
}
})
new Vue({
template: `
<div id="app">
<h1>Basic Render</h1>
<p>Inspect Element to see the meta info</p>
<child page="This is a prop"></child>
</div>
`
}).$mount('#app')