Today, a magical phenomenon was found in using elementUi
when using tabled
use a table
< el-table ref= "table" > < / el-table >
when trying to print this.$refs.table, you can find
this.$refs.table.clearSelection()
table
this.$refs.table1 this.$refs.table2
at this time, we call this.$refs.table1.clearSelection ()
this.$refs.table2.clearSelection () to report an error.
call mode becomes this.$refs.table1 [0] .clearSelection ()
this.$refs.table2 [0] .clearSelection ()
I want to ask why bosses have such a change when multiple table exist. This.$refs.table changes from objects to arrays of objects