Cannot read property 'value' of null Occurred while linting?

新手上路,请多包涵
 getDefaultFactoryCode = () => {
    Utils.request({
      url: `${window.API_HOST}/common/queryCodeDesc`,
      method: 'get',
      data: {
        classType: 'GC',
        entity: 'MRC',
      },
    })
      .then(res => {
        if (res.flag === 'S' && res.data !== null) {
          if (res && res.data && res.data.length) {
            this.defaultFactoryCode = res.data[0].code;
          }
        }
      })
      .catch((res) => {
        message.error(res.message);
      });
  }
阅读 2.9k
1 个回答

就是字面意思,无法在null上获取value属性,这里没看出你哪里使用了,检查下你的数据,有没有哪个被赋值了null

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