blob: d52295071a90f5cda4b7ddf00f41d32bedc47ebd [file] [log] [blame]
<script>
export default {
name: 'vue-title',
props: ['appName', 'traceName'],
watch: {
traceName: {
immediate: true,
handler() {
this.updatePageTitle();
}
},
appName: {
immediate: true,
handler() {
this.updatePageTitle();
}
}
},
methods: {
updatePageTitle() {
if (this.traceName == null || this.traceName == "") {
document.title = this.appName;
} else {
document.title = this.traceName;
}
}
},
render () {
},
}
</script>