File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11<template >
22 <div class =" app-container" >
33 <!-- 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% " >
55
66 <el-table-column align =" center" label =" ID" width =" 65" >
77 <template slot-scope="scope">
@@ -107,7 +107,7 @@ export default {
107107 })
108108 },
109109 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 ]
111111 this .sortable = Sortable .create (el, {
112112 ghostClass: ' sortable-ghost' , // Class name for the drop placeholder,
113113 setData : function (dataTransfer ) {
You can’t perform that action at this time.
0 commit comments