react在ie10出现 无法获取未定义或 null 引用的属性“content”

clipboard.png
这是我的代码
constructor(arg) {

super(arg);
this.state = {
  content: this.props.content.contentType === "common" ? this.props.content.content.slice(0, 4) : null,
  listIndex: 4,
  problemType: 'common',
  events: this.props.ProfessionalProblemList,
  beginX: null,
  beginY: null,
  endX: null,
  endY: null
}

};

阅读 4.3k
1 个回答
新手上路,请多包涵

ie中需要把this.props修改成arg,即在super中声明的参数

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题