如何写精华回答,获更多曝光?
发布
Error message:The forEach method cannot be bound, 调用的对象是ArrayList
export class LUBCUAAgreementInfo {
id?: number
type?: string
}
export class LUBCUAUnifyAuthSceneInfoResult {
id?: number
sceneCode?: string
agreementInfoDTOS?: ArrayList<LUBCUAAgreementInfo>
}
调用代码
@Component
export struct LUBCUALoginView {
@Prop agreementData?: LUBCUAUnifyAuthSceneInfoResult
aboutToAppear(): void {
this.agreementData?.agreementInfoDTOS?.forEach((value: LUBCUAAgreementInfo, index: number) => {
})
}
}