mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
test: Add children fixPrepatch example
This commit is contained in:
parent
8318ce7510
commit
dc7d4bfab7
13
test/fixtures/children/layouts/patch.vue
vendored
Normal file
13
test/fixtures/children/layouts/patch.vue
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<nuxt/>
|
||||
<ul>
|
||||
<li><nuxt-link data-test-id="patch" to="/patch">/patch</nuxt-link></li>
|
||||
<li><nuxt-link data-test-id="patch-id-1" to="/patch/1">/patch/1</nuxt-link></li>
|
||||
<li><nuxt-link data-test-id="patch-id-2" to="/patch/2">/patch/2</nuxt-link></li>
|
||||
<li><nuxt-link data-test-id="patch-id-child" to="/patch/2/child">/patch/2/child</nuxt-link></li>
|
||||
<li><nuxt-link data-test-id="patch-id-2-child-1" to="/patch/2/child/1">/patch/2/child/1</nuxt-link></li>
|
||||
<li><nuxt-link data-test-id="patch-id-2-child-1" to="/patch/2/child/1?query=true">/patch/2/child/1?query=true</nuxt-link></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
17
test/fixtures/children/pages/patch.vue
vendored
Normal file
17
test/fixtures/children/pages/patch.vue
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>patch: {{ date }}</h1>
|
||||
<nuxt-child/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
layout: 'patch',
|
||||
asyncData() {
|
||||
return {
|
||||
date: Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
16
test/fixtures/children/pages/patch/_id.vue
vendored
Normal file
16
test/fixtures/children/pages/patch/_id.vue
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<h2>_id: {{ date }}</h2>
|
||||
<nuxt-child/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData() {
|
||||
return {
|
||||
date: Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
16
test/fixtures/children/pages/patch/_id/child.vue
vendored
Normal file
16
test/fixtures/children/pages/patch/_id/child.vue
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<h3>child: {{ date }}</h3>
|
||||
<nuxt-child/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData() {
|
||||
return {
|
||||
date: Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
13
test/fixtures/children/pages/patch/_id/child/_slug.vue
vendored
Normal file
13
test/fixtures/children/pages/patch/_id/child/_slug.vue
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<h4>_id: {{ date }}</h4>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData() {
|
||||
return {
|
||||
date: Date.now()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
3
test/fixtures/children/pages/patch/_id/index.vue
vendored
Normal file
3
test/fixtures/children/pages/patch/_id/index.vue
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<h3>Index</h3>
|
||||
</template>
|
3
test/fixtures/children/pages/patch/index.vue
vendored
Normal file
3
test/fixtures/children/pages/patch/index.vue
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<h2>Index</h2>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user