When using element UI in Vue project, an error is reported:
[Vue warn]: error in nexttick: "typeerror: cannot read property 'map' of null"
The error message is as follows:
It’s ridiculous. I studied it myself and recorded it. It’s all the fault of carelessness:
The reason is that the data source of El table is initially set to null. When the default sort attribute is used, the table will map the data source by default and report an error
currentpagedata: null to
currentpagedata:  .
Locate the error location 10051 line according to the error information:
array.map reports the error as null, and then locate the array up:
according to the parameters and contents of this method, it is basically determined that the error information is caused by the default sort attribute of El table, that is, the data source array of El table during compilation and sorting is null
looking back at the data source, I found that the data source was initially assigned null. No wonder
change the initial value of the data source array to  empty array.
Itself is a very simple mistake, but I didn’t expect it.
- Map to vector pair map.second sort
- Modification method of starting value of MySQL auto increment ID
- Set the default time to the current value in MySQL
- Some problems in using arrays
- ERROR 1406 (22001): Data Too Long, field len 30, data len 48
- Lua — using remove to delete table data
- [react+antd] Table Error: Unhandled Rejection (TypeError): data.slice is not a function
- C++: terminate called after throwing an instance of ‘std::length_error‘ (sort function cmp sorting rules problem)
- E: unable to locate package MySQL server error solution
- The back end cannot receive the parameters passed by the front end
- MySQL partitions the existing tables of the data table
- Pg_dump Error: pg_dump: No matching tables were found，pg_dump: schema with OID 1515227 does not exi
- Removing duplicate lines from Linux shell files
- JS prompt cannot read property ‘style’ of undefined
- Duplicate entry ‘787192513’ for key ‘primary’
- AAPT: error: ‘null‘ is incompatible with attribute button (attr) reference.
- Python uses the priority queue to get the maximum k elements
- The socket connection was aborted in WCF
- 1822 – Failed to add the foreign key constraint. Missing index for constraint ‘tb_emp_ibfk_1’ in the
- Array of PHP_ diff，array_ intersect，array_ merge， in_ Is there a limit on the number of arrays in array?