2021-04-23 19:52:32 +00:00
|
|
|
<template>
|
2021-10-02 20:30:20 +00:00
|
|
|
<div>
|
2022-02-14 10:46:27 +00:00
|
|
|
<Head>
|
|
|
|
<Title>Basic fixture</Title>
|
|
|
|
</Head>
|
2022-02-18 18:14:57 +00:00
|
|
|
<h1>Hello Nuxt 3!</h1>
|
2022-03-08 18:03:21 +00:00
|
|
|
<div>RuntimeConfig | testConfig: {{ config.testConfig }}</div>
|
2023-03-06 00:26:09 +00:00
|
|
|
<div>RuntimeConfig | baseURL: {{ config.baseURL }}</div>
|
2022-03-08 18:03:21 +00:00
|
|
|
<div>Composable | foo: {{ foo }}</div>
|
|
|
|
<div>Composable | bar: {{ bar }}</div>
|
2023-03-01 12:24:46 +00:00
|
|
|
<div>Composable | template: {{ templateAutoImport }}</div>
|
|
|
|
<div>Composable | star: {{ useNestedBar() }}</div>
|
2022-12-13 09:39:14 +00:00
|
|
|
<DevOnly>Some dev-only info</DevOnly>
|
|
|
|
<div><DevOnly>Some dev-only info</DevOnly></div>
|
2022-05-03 09:31:58 +00:00
|
|
|
<div>Path: {{ $route.fullPath }}</div>
|
2022-04-04 08:23:11 +00:00
|
|
|
<NuxtLink to="/">
|
|
|
|
Link
|
|
|
|
</NuxtLink>
|
2023-02-16 12:43:58 +00:00
|
|
|
<NuxtLink to="/chunk-error" :prefetch="false">
|
|
|
|
Chunk error
|
|
|
|
</NuxtLink>
|
2023-01-22 16:46:45 +00:00
|
|
|
<NestedSugarCounter :multiplier="2" />
|
2022-02-17 14:23:55 +00:00
|
|
|
<CustomComponent />
|
2023-01-25 10:30:59 +00:00
|
|
|
<Spin>Test</Spin>
|
2022-07-27 13:05:34 +00:00
|
|
|
<component :is="`test${'-'.toString()}global`" />
|
|
|
|
<component :is="`with${'-'.toString()}suffix`" />
|
2022-08-02 15:05:02 +00:00
|
|
|
<ClientWrapped ref="clientRef" style="color: red;" class="client-only" />
|
2023-01-09 11:20:33 +00:00
|
|
|
<ServerOnlyComponent class="server-only" style="background-color: gray;" />
|
2021-10-02 20:30:20 +00:00
|
|
|
</div>
|
2021-04-23 19:52:32 +00:00
|
|
|
</template>
|
2021-10-02 20:30:20 +00:00
|
|
|
|
2022-11-02 10:28:41 +00:00
|
|
|
<script setup lang="ts">
|
2022-08-17 14:44:36 +00:00
|
|
|
import { setupDevtoolsPlugin } from '@vue/devtools-api'
|
2022-07-21 14:27:23 +00:00
|
|
|
import { useRuntimeConfig } from '#imports'
|
2022-11-10 10:31:01 +00:00
|
|
|
import { importedValue, importedRE } from '~/some-exports'
|
2022-07-21 14:27:23 +00:00
|
|
|
|
2022-11-02 10:28:41 +00:00
|
|
|
setupDevtoolsPlugin({}, () => {}) as any
|
2022-08-17 14:44:36 +00:00
|
|
|
|
2022-02-25 20:14:53 +00:00
|
|
|
const config = useRuntimeConfig()
|
|
|
|
|
2022-09-22 13:54:34 +00:00
|
|
|
definePageMeta({
|
2022-11-02 10:28:41 +00:00
|
|
|
alias: '/some-alias',
|
2022-11-10 10:31:01 +00:00
|
|
|
other: ref('test'),
|
|
|
|
imported: importedValue,
|
|
|
|
something: importedRE.test('an imported regex')
|
2022-09-22 13:54:34 +00:00
|
|
|
})
|
|
|
|
|
2022-08-02 11:20:44 +00:00
|
|
|
// reset title template example
|
|
|
|
useHead({
|
2022-08-10 15:46:46 +00:00
|
|
|
titleTemplate: ''
|
2022-08-02 11:20:44 +00:00
|
|
|
})
|
|
|
|
|
2022-02-25 20:14:53 +00:00
|
|
|
const foo = useFoo()
|
|
|
|
const bar = useBar()
|
2022-08-02 15:05:02 +00:00
|
|
|
const clientRef = ref()
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
clientRef.value.exposedFunc()
|
|
|
|
})
|
2021-10-02 20:30:20 +00:00
|
|
|
</script>
|