mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
update head serialize logic
This commit is contained in:
parent
5e6ff01f30
commit
2fd1b229cb
@ -17,7 +17,7 @@ const layouts = { <%= Object.keys(layouts).map(key => `"_${key}": _${hash(key)}`
|
|||||||
<% if (splitChunks.layouts) { %>let resolvedLayouts = {}<% } %>
|
<% if (splitChunks.layouts) { %>let resolvedLayouts = {}<% } %>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
head: <%= serialize(head).replace('head(', 'function(').replace('titleTemplate(', 'function(') %>,
|
head: <%= serialize(head).replace(/:\w+\(/gm, ':function(') %>,
|
||||||
render(h, props) {
|
render(h, props) {
|
||||||
<% if (loading) { %>const loadingEl = h('nuxt-loading', { ref: 'loading' })<% } %>
|
<% if (loading) { %>const loadingEl = h('nuxt-loading', { ref: 'loading' })<% } %>
|
||||||
const layoutEl = h(this.layout || 'nuxt')
|
const layoutEl = h(this.layout || 'nuxt')
|
||||||
@ -121,4 +121,3 @@ export default {
|
|||||||
<%= (loading ? 'NuxtLoading' : '') %>
|
<%= (loading ? 'NuxtLoading' : '') %>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user