2022-01-31 21:13:58 +00:00
|
|
|
<script setup>
|
|
|
|
const themeConfig = useRuntimeConfig().theme
|
2022-03-09 11:03:36 +00:00
|
|
|
const foo = useFoo()
|
|
|
|
const bar = getBar()
|
2022-01-31 21:13:58 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-03-23 08:44:36 +00:00
|
|
|
<NuxtExampleLayout show-tips example="config-extends">
|
2022-01-31 21:13:58 +00:00
|
|
|
theme runtimeConfig
|
|
|
|
<pre>{{ JSON.stringify(themeConfig, null, 2) }}</pre>
|
2022-02-07 20:48:25 +00:00
|
|
|
<BaseButton>Base Button</BaseButton>
|
|
|
|
<FancyButton>Fancy Button</FancyButton>
|
2022-03-16 20:36:30 +00:00
|
|
|
<UIButton>UI Button</UIButton>
|
2022-03-09 11:03:36 +00:00
|
|
|
<br>
|
|
|
|
{{ foo }} {{ bar }}
|
|
|
|
<br>
|
2022-03-09 10:51:32 +00:00
|
|
|
{{ $myPlugin() }}
|
2022-03-23 08:44:36 +00:00
|
|
|
<template #tips>
|
|
|
|
<p>
|
|
|
|
This example shows how to use the <code>extends</code> key in <code>nuxt.config.ts</code> to use the <code>base/</code> directory as a base Nuxt application, and use its components, composable or config and override them if necessary.
|
|
|
|
</p>
|
|
|
|
</template>
|
2022-01-31 21:13:58 +00:00
|
|
|
</NuxtExampleLayout>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
pre {
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
</style>
|