Tag Archives: Element-ui Error

Element-ui Error: Uncaught (in promise) cancel [How to Solve]

Analysis: the reason for uncaught (in promise) cancel is that. Catch () cannot be removed from the built-in promise method of this. $confirm method, and cannot be captured without. Catch cancellation operation.
the usage of error is as follows:

The console reports the following errors:

The correct usage is as follows:

[Solved] Element-ui Error: [Vue warn]: Invalid prop: type check failed for prop “index”. Expected String with value “1”, got Number with value 1

Error screenshot:

 

wrong reason:

The index value type of the menu component in element-ui must be a string type. I bound the index property and assigned it to a num value type, so an error was reported.

<el- submenu
     :index ="index + 1" 
     :key ="index" 
     v - for ="(item, index) in menus"></el-submenu>

solution:

Just change the value of the :index attribute to a string type,

<el- submenu
     :index ="index + 1 +''" 
     :key ="index" 
     v - for ="(item, index) in menus"></el-submenu>

Perfect solution: