如何在defineProps接收自定义的对象数组。 #6648
xcmonline
started this conversation in
General Discussions
Replies: 1 comment 1 reply
-
props应该是一个对象,你应该使用如下定义
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
比如我在组件中定义了对象。
interface UserInfo{
Name: String,
Age: int
}
const props = defineProps<UserInfo[]>();
不允许这样定义,如何在defineProps中接收数组,及多个对象。
Beta Was this translation helpful? Give feedback.
All reactions