-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed as not planned
Closed as not planned
Copy link
Labels
need more infoFurther information is requestedFurther information is requested
Description
Vue version
3.3.4
Link to minimal reproduction
Steps to reproduce
Comp.vue
<script setup lang="ts">
const { name = 'default name' } = defineProps<{
name?: string
}>()
console.log(`Name: ${ name };`)
</script>
<template>
<div>Name: {{ name }} ;</div>
</template>
App.vue
<Comp name="jeffrey" />
<Comp />
the default value is not render in page, but console output the default value.
What is expected?
the page render:
Name: jeffrey;
Name: default name;
the console output:
Name: jeffrey;
Name: default name;
What is actually happening?
the page render:
Name: jeffrey;
Name: ;
the console output:
Name: jeffrey;
Name: default name;
System Info
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
need more infoFurther information is requestedFurther information is requested