From e686844b036dfd50f77dd56641ecc9203e7eb3d6 Mon Sep 17 00:00:00 2001 From: Wu Haotian Date: Mon, 7 Aug 2017 15:11:47 +0800 Subject: [PATCH] App.vue: check `resolvedLayouts` in `setLayout` --- lib/app/App.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/app/App.vue b/lib/app/App.vue index 9febdf0078..aa5edcde53 100644 --- a/lib/app/App.vue +++ b/lib/app/App.vue @@ -35,14 +35,14 @@ export default { <% } %> methods: { setLayout (layout) { - if (!layout || !layouts['_' + layout]) layout = 'default' + if (!layout || !resolvedLayouts['_' + layout]) layout = 'default' this.layoutName = layout let _layout = '_' + layout - this.layout = layouts[_layout] + this.layout = resolvedLayouts[_layout] return this.layout }, loadLayout (layout) { - if (!layout || !layouts['_' + layout]) layout = 'default' + if (!layout || !(layouts['_' + layout] || resolvedLayouts['_' + layout])) layout = 'default' let _layout = '_' + layout if (resolvedLayouts[_layout]) { return Promise.resolve(resolvedLayouts[_layout])