mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
Remove nuxt-container
This commit is contained in:
parent
e3ebb6a54e
commit
fcae73a79b
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<nuxt-container>
|
<div id="__nuxt">
|
||||||
<component v-if="layout" :is="layout"></component>
|
<component v-if="layout" :is="layout"></component>
|
||||||
</nuxt-container>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -14,6 +14,7 @@ layoutsKeys.forEach(function (key, i) { %>
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
head: <%= JSON.stringify(head) %>,
|
||||||
data: () => ({
|
data: () => ({
|
||||||
layout: null,
|
layout: null,
|
||||||
layoutName: ''
|
layoutName: ''
|
||||||
@ -46,3 +47,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<% css.forEach(function (c) { %>
|
||||||
|
<style src="<%= (typeof c === 'string' ? c : c.src) %>" lang="<%= (c.lang ? c.lang : 'css') %>"></style>
|
||||||
|
<% }) %>
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="__nuxt">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'nuxt-container',
|
|
||||||
head: <%= JSON.stringify(head) %>
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<% css.forEach(function (c) { %>
|
|
||||||
<style src="<%= (typeof c === 'string' ? c : c.src) %>" lang="<%= (c.lang ? c.lang : 'css') %>"></style>
|
|
||||||
<% }) %>
|
|
@ -4,14 +4,11 @@ import Vue from 'vue'
|
|||||||
import Meta from 'vue-meta'
|
import Meta from 'vue-meta'
|
||||||
import router from './router.js'
|
import router from './router.js'
|
||||||
<% if (store) { %>import store from '~store/index.js'<% } %>
|
<% if (store) { %>import store from '~store/index.js'<% } %>
|
||||||
import NuxtContainer from './components/nuxt-container.vue'
|
|
||||||
import NuxtChild from './components/nuxt-child.js'
|
import NuxtChild from './components/nuxt-child.js'
|
||||||
import NuxtLink from './components/nuxt-link.js'
|
import NuxtLink from './components/nuxt-link.js'
|
||||||
import Nuxt from './components/nuxt.vue'
|
import Nuxt from './components/nuxt.vue'
|
||||||
import App from '<%= appPath %>'
|
import App from '<%= appPath %>'
|
||||||
|
|
||||||
// Component: <nuxt-container>
|
|
||||||
Vue.component(NuxtContainer.name, NuxtContainer)
|
|
||||||
// Component: <nuxt-child>
|
// Component: <nuxt-child>
|
||||||
Vue.component(NuxtChild.name, NuxtChild)
|
Vue.component(NuxtChild.name, NuxtChild)
|
||||||
// Component: <nuxt-link>
|
// Component: <nuxt-link>
|
||||||
|
@ -154,7 +154,6 @@ function * generateRoutesAndFiles () {
|
|||||||
'router.js',
|
'router.js',
|
||||||
'server.js',
|
'server.js',
|
||||||
'utils.js',
|
'utils.js',
|
||||||
'components/nuxt-container.vue',
|
|
||||||
'components/nuxt-loading.vue',
|
'components/nuxt-loading.vue',
|
||||||
'components/nuxt-child.js',
|
'components/nuxt-child.js',
|
||||||
'components/nuxt-link.js',
|
'components/nuxt-link.js',
|
||||||
@ -360,8 +359,10 @@ function createRenderer (bundle) {
|
|||||||
|
|
||||||
function watchPages () {
|
function watchPages () {
|
||||||
const patterns = [
|
const patterns = [
|
||||||
|
r(this.srcDir, 'pages'),
|
||||||
r(this.srcDir, 'pages/*.vue'),
|
r(this.srcDir, 'pages/*.vue'),
|
||||||
r(this.srcDir, 'pages/**/*.vue'),
|
r(this.srcDir, 'pages/**/*.vue'),
|
||||||
|
r(this.srcDir, 'layouts'),
|
||||||
r(this.srcDir, 'layouts/*.vue'),
|
r(this.srcDir, 'layouts/*.vue'),
|
||||||
r(this.srcDir, 'layouts/**/*.vue')
|
r(this.srcDir, 'layouts/**/*.vue')
|
||||||
]
|
]
|
||||||
|
5
test/fixtures/with-config/layouts/app.vue
vendored
5
test/fixtures/with-config/layouts/app.vue
vendored
@ -1,5 +0,0 @@
|
|||||||
<template>
|
|
||||||
<nuxt-container>
|
|
||||||
<nuxt/>
|
|
||||||
</nuxt-container>
|
|
||||||
</template>
|
|
6
test/fixtures/with-config/layouts/default.vue
vendored
Normal file
6
test/fixtures/with-config/layouts/default.vue
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1>Default layout</h1>
|
||||||
|
<nuxt/>
|
||||||
|
</div>
|
||||||
|
</template>
|
Loading…
Reference in New Issue
Block a user