Errors encountered during development

Errors encountered during development

1. Use Element-ui navigation, click on a navigation repeatedly, and encounter an error, the error message is as follows:

Uncaught (in promise) Error: Avoided redundant navigation to current location: "/xxx/xxx/xxx"
 

(Look at the Internet: This error will appear after vue-router 3.0)

The solution is as follows:

Add the following code to the project routing configuration file:

Router.prototype.push = function push(location) {
  return Router.prototype.push.call(this, location).catch(err => err)
}
 

2. Unable to read the undefined attribute "XXX"

The error message is as follows:
Cannot read property 'XXX' of undefined
 
Reason for the error:

The front end accepts the data returned by the back end, and the data objects are nested deeply.

For example:
  aaa.bbb.ccc
  {}
  aaa.bbb.ccc  
 

Solution
//  null      
// 
if (!Bollean(aaa.bbb)) {
	return
}
 

3. Unable to read the undefined attribute "forEach"

The error message is as follows:
Cannot read property 'forEach' of undefined
 
Cause of error
forEach  
  forEach  
 
Solution:
  forEach  
 

4. The attribute value of the type "java.lang.String" of the attribute "opportunityId" cannot be converted to the required type "java.lang.Integer"

The error message is as follows:
Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Integer' for property 'opportunityId';
 
Cause of error
 
  number  
 
Solution
// 
 :
  number
<el-input
      :step="step"
      type="number"
      clearable
      v-model="currentVal"
      onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
      @mousewheel.native.prevent
      v-on="$listeners"
      v-bind="$attrs"></el-input>
      
  onKeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
  number
ps  element-ui   type = number   'e'
 

5. TypeError: Unable to get the undefined or null referenced property "encryptOpportunityPhone"

The error message is as follows:

TypeError: Unable to get property 'encryptOpportunityPhone' of undefined or null reference
 

The reason for the error:

 
// 
 

6. Cannot read the null attribute "length"

The error message is as follows:

TypeError: Cannot read property 'length' of null
 

The reason for the error:

 length
 
 

7. Exceed the ResizeObserver cycle limit

The error message is as follows:

msg: "ResizeObserver loop limit exceeded"
// 
 

The reason for the error:

//element-ui  2.3.5 Table-column type type selection/index/expand 
// type type ResizeObserver loop limit
//exceeded column table 
 

Solution: