-
+
@@ -211,6 +224,11 @@
}
}
+ function onMove(e) {
+ if (e.draggedContext.element.draggable === false) return false;
+ return true;
+ }
+
//固定
function fixedColumn(item, fixed) {
if (!state.checkList.includes(item.key)) return;
@@ -232,6 +250,7 @@
onChange,
onCheckAll,
onSelection,
+ onMove,
resetColumns,
fixedColumn,
draggableEnd,
@@ -275,6 +294,10 @@
display: inline-flex;
margin-right: 8px;
cursor: move;
+ &-hidden {
+ visibility: hidden;
+ cursor: default;
+ }
}
.fixed-item {
diff --git a/src/components/Table/src/types/table.ts b/src/components/Table/src/types/table.ts
index e9ab591..96e4d68 100644
--- a/src/components/Table/src/types/table.ts
+++ b/src/components/Table/src/types/table.ts
@@ -14,6 +14,8 @@ export interface BasicColumn extends TableBaseColumn {
auth?: string[];
// 业务控制是否显示
ifShow?: boolean | ((column: BasicColumn) => boolean);
+ // 控制是否支持拖拽,默认支持
+ draggable?: boolean;
}
export interface TableActionType {