Skip to content

Commit

Permalink
fix(Meta): change meta after client takeover if there are changes qua…
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Apr 24, 2020
1 parent ac9df17 commit 949d3c2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/dev/src/index.template.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>Quasar Development</title>
<!-- <title>Quasar Development</title> -->

<meta charset="utf-8">
<meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
Expand Down
25 changes: 25 additions & 0 deletions ui/dev/src/pages/meta/title.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div class="q-layout-padding">
<h5>Title of document should be "Test End"</h5>
</div>
</template>

<script>
export default {
data () {
return {
title: 'Test Start'
}
},
mounted () {
this.title = 'Test End'
},
meta () {
return {
title: this.title
}
}
}
</script>
4 changes: 4 additions & 0 deletions ui/dev/src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ let routes = [
component: load('meta/layout_1'),
children: metaChildren
},
{
path: '/meta/title',
component: load('meta/title')
},
{
path: '/meta/layout_2',
component: load('meta/layout_2'),
Expand Down
1 change: 0 additions & 1 deletion ui/src/plugins/Meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ function updateClient () {
ssrTakeover = false
this.$root.__currentMeta = window.__Q_META__
document.body.querySelector('script[data-qmeta-init]').remove()
return
}

const meta = {
Expand Down

0 comments on commit 949d3c2

Please sign in to comment.