The same one is found on the Internet. It is said that columns defines n slots, but n slots are not used in HTML. Although this is also one of the reasons, it is not my reason. Finally, I found that the reason for my problem is:
Two < are defined in the HTML template; Table>, Table1 has a slot and table2 does not. They are packaged in two different < template> Which is displayed through the V-IF control?Table1 is initially displayed, but table2 is displayed when the switching condition is triggered, but an error will be reported when switching back to table1. The solution is to give two <Table> Add the key attribute,
The essential reason is that Vue reuses the table component (the first one) because the key attribute is not added to the table. When switching to table2, there is no error because the columns of table2 do not define a slot, but when switching back to the first table1, an error will be reported.
Similar Posts:
- Vue3 vue.draggable slot jsx Error: Error: draggable element must have an item slot
- [Solved] Vue Error: Error in render: “TypeError: Cannot read property ‘length‘ of undefined“
- [Solved] Execute the redis command redis-trib.rb to view the cluster information error: cannot load such file — redis (LoadError)
- HP Proliant Blade Error “Server Blade Enclosure Power Request Denied Electronic Keying or I/O Configuration Error”
- error: command ‘gcc’ failed with exit status 1
- export ‘default’ (imported as ‘mod’) was not found in ‘-!../../../../node_module .vue?vue&type=script&lang=ts&’ (possible exports: __esModule)
- How to Customizate the Style of Option Box by JQuery Component
- [Solved] Vue Upgrade Error: TypeError:Cannot read property ‘parseComponent’ of undefined
- Vue adds route errors dynamically: Uncaught Error… [How to Solve]