2
0
mirror of https://github.com/tenrok/vue-meta.git synced 2026-06-21 15:10:33 +03:00

fix: trigger meta refresh on page load (fixes #283)

This commit is contained in:
pimlie
2019-02-11 15:10:56 +01:00
parent 502c89e356
commit b824a27d35
2 changed files with 33 additions and 3 deletions
+11 -1
View File
@@ -11,8 +11,18 @@ const ChildComponent = {
template: `<h3>You're looking at the <strong>{{ page }}</strong> page</h3>`,
metaInfo () {
return {
title: this.page
title: `${this.page} - ${this.date && this.date.toTimeString()}`
}
},
data() {
return {
date: null
};
},
mounted() {
setInterval(() => {
this.date = new Date();
}, 1000);
}
}