0👍
check this link
https://vuejs.org/guide/typescript/composition-api.html#props-default-values
<script setup lang="ts">
interface Props {
foo: string
bar?: number
}
// reactive destructure for defineProps()
// default value is compiled to equivalent runtime option
const { foo, bar = 100 } = defineProps<Props>()
</script>
- [Vuejs]-Problem with Cypress during VUE installation
- [Vuejs]-Vue3/Quasar. 'q-' custom elements aren't recognized as quasar's elements
Source:stackexchange.com