feat: 代码生成字段配置列表支持拖拽排序

Closes #IAG7UD
This commit is contained in:
2024-08-20 22:44:51 +08:00
parent f321030c4c
commit fcbc3ebbff

View File

@@ -42,8 +42,10 @@
:loading="loading"
:scroll="{ x: '100%', y: 800, minWidth: 900 }"
:pagination="false"
:draggable="{ type: 'handle', width: 40 }"
:disabled-tools="['setting', 'refresh']"
:disabled-column-keys="['tableName']"
@change="handleChangeSort"
>
<template #custom-left>
<a-popconfirm
@@ -189,6 +191,11 @@ const handleRefresh = async (tableName: string) => {
await getDataList(tableName, true)
}
// 拖拽排序
const handleChangeSort = (newDataList: FieldConfigResp[]) => {
dataList.value = newDataList
}
const activeKey = ref('1')
// 保存
const save = async () => {