mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-10-28 14:59:26 +08:00
feat: 代码生成字段配置列表支持拖拽排序
Closes #IAG7UD
This commit is contained in:
@@ -42,8 +42,10 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:scroll="{ x: '100%', y: 800, minWidth: 900 }"
|
:scroll="{ x: '100%', y: 800, minWidth: 900 }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
|
:draggable="{ type: 'handle', width: 40 }"
|
||||||
:disabled-tools="['setting', 'refresh']"
|
:disabled-tools="['setting', 'refresh']"
|
||||||
:disabled-column-keys="['tableName']"
|
:disabled-column-keys="['tableName']"
|
||||||
|
@change="handleChangeSort"
|
||||||
>
|
>
|
||||||
<template #custom-left>
|
<template #custom-left>
|
||||||
<a-popconfirm
|
<a-popconfirm
|
||||||
@@ -189,6 +191,11 @@ const handleRefresh = async (tableName: string) => {
|
|||||||
await getDataList(tableName, true)
|
await getDataList(tableName, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 拖拽排序
|
||||||
|
const handleChangeSort = (newDataList: FieldConfigResp[]) => {
|
||||||
|
dataList.value = newDataList
|
||||||
|
}
|
||||||
|
|
||||||
const activeKey = ref('1')
|
const activeKey = ref('1')
|
||||||
// 保存
|
// 保存
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user