mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-17 11:29:38 +03:00
28 lines
453 B
JavaScript
28 lines
453 B
JavaScript
import Vue from 'vue'
|
|
import VueMeta from 'vue-meta'
|
|
|
|
Vue.use(VueMeta)
|
|
|
|
Vue.component('child', {
|
|
name: 'Child',
|
|
props: ['page'],
|
|
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')
|