mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(vue-app): move head to index to avoid global state (#6807)
This commit is contained in:
parent
7af9ec8c23
commit
0cb2df73a0
@ -28,11 +28,6 @@ const layouts = { <%= Object.keys(layouts).map(key => `"_${key}": _${hash(key)}`
|
|||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
<% if (features.meta) { %>
|
|
||||||
<%= isTest ? '/* eslint-disable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
|
|
||||||
head: <%= serializeFunction(head) %>,
|
|
||||||
<%= isTest ? '/* eslint-enable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
|
|
||||||
<% } %>
|
|
||||||
render (h, props) {
|
render (h, props) {
|
||||||
<% if (loading) { %>const loadingEl = h('NuxtLoading', { ref: 'loading' })<% } %>
|
<% if (loading) { %>const loadingEl = h('NuxtLoading', { ref: 'loading' })<% } %>
|
||||||
<% if (features.layouts) { %>
|
<% if (features.layouts) { %>
|
||||||
|
@ -85,6 +85,11 @@ async function createApp (ssrContext) {
|
|||||||
// here we inject the router and store to all child components,
|
// here we inject the router and store to all child components,
|
||||||
// making them available everywhere as `this.$router` and `this.$store`.
|
// making them available everywhere as `this.$router` and `this.$store`.
|
||||||
const app = {
|
const app = {
|
||||||
|
<% if (features.meta) { %>
|
||||||
|
<%= isTest ? '/* eslint-disable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
|
||||||
|
head: <%= serializeFunction(head) %>,
|
||||||
|
<%= isTest ? '/* eslint-enable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
|
||||||
|
<% } %>
|
||||||
<% if (store) { %>store,<% } %>
|
<% if (store) { %>store,<% } %>
|
||||||
router,
|
router,
|
||||||
nuxt: {
|
nuxt: {
|
||||||
|
Loading…
Reference in New Issue
Block a user