defineProps: Invalid prop: type check failed for prop "valueExpr" Expected Object #10296
Unanswered
maxdiable
asked this question in
Help/Questions
Replies: 1 comment
-
When defining the props types with the generic argument, you cannot define a object with See: https://vuejs.org/guide/typescript/composition-api.html#props-default-values Or define them the "old school way with an actual config object: <script setup lang="ts">
const props = defineProps({
valueExpr: { type: string, default: "descrizione" }
})
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi, i have mi child component with:
<script setup lang="ts"> const props = defineProps<{ valueExpr: { type: string, default: "descrizione", }, }>() </script>i call this child on my parent:
<dx-select-box :value-expr=cod_istat_comune" />
but console firefox show this error: Invalid prop: type check failed for prop "valueExpr". Expected Object, got String with value "cod_istat_comune".
any help ?
br Max
Beta Was this translation helpful? Give feedback.
All reactions