fix(vue-app): no need to set layout on App (#7606)

This commit is contained in:
Sébastien Chopin 2020-06-25 15:23:06 +02:00 committed by GitHub
parent 4a0cf8f404
commit fe01ec34d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,25 +41,12 @@ export default {
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) { %>
<% if (components.ErrorPage) { %>
if (this.nuxt.err && NuxtError) {
const errorLayout = (NuxtError.options || NuxtError).layout
if (errorLayout) {
this.setLayout(
typeof errorLayout === 'function'
? errorLayout.call(NuxtError, this.context)
: errorLayout
)
}
}
<% } %>
const layoutEl = h(this.layout || 'nuxt') const layoutEl = h(this.layout || 'nuxt')
const templateEl = h('div', { const templateEl = h('div', {
domProps: { domProps: {
id: '__layout' id: '__layout'
}, },
key: this.layoutName
key: this.layoutName
}, [layoutEl]) }, [layoutEl])
<% } else { %> <% } else { %>
const templateEl = h('nuxt') const templateEl = h('nuxt')