mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
27 lines
445 B
Vue
27 lines
445 B
Vue
<script setup lang="ts">
|
|
const props = defineProps({
|
|
bool: Boolean,
|
|
number: Number,
|
|
str: String,
|
|
obj: Object,
|
|
})
|
|
|
|
const hasRouter = useState('hasRouter', () => !!useRouter())
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
Was router enabled: {{ hasRouter }}
|
|
<br>
|
|
Props:
|
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
|
<pre v-html="JSON.stringify(props, null, 2)" />
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
pre {
|
|
color: blue
|
|
}
|
|
</style>
|