问题描述
它确实以这种方式工作:
@prop()
@ApiProperty({
description: "正面内容",type: 'array',items: {
type: 'array',items: {
default: {
aa:33,bb:44
}
}
}
})
front: TplParentData[][]
但它没有以这种方式工作:
class dto{
@prop({ default: 33 })
@ApiProperty({ example: 33 })
a: number
@prop({ default: 44 })
@ApiProperty({ example: 44 })
b: number
}
@prop()
@ApiProperty({
description: "正面内容",items: {
default:dto
}
}
})
front: TplParentData[][]
问题:如何在这个地方使用“dto”类?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)