From 18897f3f3976168cd2428922a024f90a28343008 Mon Sep 17 00:00:00 2001 From: Silent YANG Date: Tue, 20 Feb 2024 23:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=96=E6=8B=BD=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/list/search-table/index.vue | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/views/list/search-table/index.vue b/src/views/list/search-table/index.vue index d34cefb..e8684dd 100644 --- a/src/views/list/search-table/index.vue +++ b/src/views/list/search-table/index.vue @@ -47,7 +47,14 @@ lazy-load :headerAffixedTop="{ offsetTop: 60 }" :hover="true" + drag-sort="row-handler" + @drag-sort="onDragSort" > + @@ -80,6 +87,8 @@ import useLoading from '@/hooks/loading'; import { eeprom_read, uint8ArrayToHexReverseString, uint8ArrayToString, hexReverseStringToUint8Array, stringToUint8Array, eeprom_write, eeprom_reboot, eeprom_init } from '@/utils/serial.js'; import { useAppStore } from '@/store'; + import { MoveIcon } from 'tdesign-icons-vue-next'; + const appStore = useAppStore(); const { loading, setLoading } = useLoading(false); @@ -120,7 +129,16 @@ nowPage: 1, }) + const onDragSort = (params: any) => { + cstate.renderData = params.newData + } + const columns = computed(() => [ + { + colKey: 'drag', // 列拖拽排序必要参数 + title: '排序', + width: 46, + }, { title: '#', colKey: 'index',