fix: 🐛 sortable 打包eslint报错(暂移除)

Former-commit-id: 72970850a01a227816f9a142df7f44632f87e9c2
This commit is contained in:
hxr
2023-08-09 08:31:31 +08:00
parent c63c14cfbc
commit 21017d407b

View File

@@ -76,7 +76,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Sortable from "sortablejs"; //import Sortable from "sortablejs";
import { fetchList } from "@/api/article"; import { fetchList } from "@/api/article";
defineOptions({ defineOptions({
@@ -127,14 +127,14 @@ const rowDrag = function () {
const tbody = document.querySelector( const tbody = document.querySelector(
".draggable .el-table__body-wrapper tbody" ".draggable .el-table__body-wrapper tbody"
); );
Sortable.create(tbody, { /* Sortable.create(tbody, {
// 可被拖拽的子元素 // 可被拖拽的子元素
draggable: ".draggable .el-table__row", draggable: ".draggable .el-table__row",
onEnd({ newIndex, oldIndex }: { newIndex: number; oldIndex: number }) { onEnd({ newIndex, oldIndex }: { newIndex: number; oldIndex: number }) {
const currRow = list.value.splice(oldIndex, 1)[0]; const currRow = list.value.splice(oldIndex, 1)[0];
list.value.splice(newIndex, 0, currRow); list.value.splice(newIndex, 0, currRow);
}, },
}); }); */
}; };
onMounted(() => { onMounted(() => {