File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" app-container" >
3
3
<!-- Note that row-key is necessary to get a correct row order. -->
4
- <el-table v-loading =" listLoading" :data =" list" row-key =" id" border fit highlight-current-row style =" width : 100% " >
4
+ <el-table v-loading =" listLoading" ref = " dragTable " :data =" list" row-key =" id" border fit highlight-current-row style =" width : 100% " >
5
5
6
6
<el-table-column align =" center" label =" ID" width =" 65" >
7
7
<template slot-scope="scope">
@@ -107,7 +107,7 @@ export default {
107
107
})
108
108
},
109
109
setSort () {
110
- const el = document .querySelectorAll (' .el-table__body-wrapper > table > tbody' )[0 ]
110
+ const el = this . $refs . dragTable . $el .querySelectorAll (' .el-table__body-wrapper > table > tbody' )[0 ]
111
111
this .sortable = Sortable .create (el, {
112
112
ghostClass: ' sortable-ghost' , // Class name for the drop placeholder,
113
113
setData : function (dataTransfer ) {
You can’t perform that action at this time.
0 commit comments