react中的TS理解

我想把自己传给后台的数据给定义一个接口,

interface Inparam{
  applyId:null;
  applyType:string;
  remark:string;
  actualApplyPersonId:number;
  isAgent:string;
  saveComplete:boolean;
  projectId:number;
  closeDate:string
}
 
表单提交的方法
const param:{projectBatchCloseUpSets:Inparam []} = {
        projectBatchCloseUpSets:[
          {
            applyId:null,
            applyType:'ADVANCE_CLOSE',
            remark:fieldsValue['closeReason'],
            actualApplyPersonId,
            isAgent,
            saveComplete:false,
            projectId,
            closeDate:expectedClosingTime
          }
        ]
      }
 
React.Component<any,any>{}这里面两个any分别代表props,state
posted @ 2020-08-24 15:16  国服第一李师师  阅读(445)  评论(0编辑  收藏  举报