为什么错了?帮我。我该怎么办。看看img
@Prop(Array) menu!: object
created() {
this.$nextTick(() => {
bus.$emit('user', this.menu[0].childs)
})
}
mounted() {
}
答案 0 :(得分:0)
如果您将类型定义为,则无法访问属性
childs
object
。因此,您可以定义特定的类型,也可以使用 以下。
@Prop(Array) menu!: { [index : string] : any}