mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-05-17 17:59:38 +03:00
33 lines
504 B
JavaScript
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')
|