Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vitest. An vitest environment with support for testing code that needs a Nuxt runtim
Something went wrong. Try again.
551 B · 32 lines
Vue
at main
123456789101112131415161718192021222324252627282930313233<template> <div> <h1>ExportDefineComponent</h1> <pre>{{ myProp }}</pre> <pre>{{ setupMyProp }}</pre> </div></template>
<!--<script setup lang="ts">const props = defineProps<{ myProp: string }>()const setupMyProp = 'X' + props.myProp</script>
Following script is a valid Vue 3 way to define a component-->
<script lang="ts">export default defineComponent({ props: { myProp: { type: String, required: true } }, setup(props) { return { setupMyProp: 'X' + props.myProp } },})</script>