diff --git a/CHANGELOG.md b/CHANGELOG.md index dbfd405bb02eef2f77874c71b6da7b2e14f976cc..7ae6e686ffb2cbd9a0bb4e9dbc62337434354e96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - 新增列表新建和拖拽功能 - 新增表格动态控件参数grouprowmode,控制分组行模式 - 新增重复器表格排序 +- 新增卡片,列表,看板项拖拽图标 ### Changed diff --git a/src/control/data-view/data-view.scss b/src/control/data-view/data-view.scss index 409d19a32d4a101d6c146958efa90b0395db1c91..6d01d45bdf1c7f08be898708050370d444ecf97e 100644 --- a/src/control/data-view/data-view.scss +++ b/src/control/data-view/data-view.scss @@ -39,6 +39,10 @@ $control-dataview-group-item-content: ( cursor: pointer; } + @include e(drag-icon) { + cursor: move; + } + // 内容区样式 @include e(content) { flex-grow: 1; diff --git a/src/control/data-view/data-view.tsx b/src/control/data-view/data-view.tsx index f31e59e7d7b2b8976ca490e1e306e4402134a251..351f31a4592c6f80a2a751a5ede2503c90fcd1ba 100644 --- a/src/control/data-view/data-view.tsx +++ b/src/control/data-view/data-view.tsx @@ -359,6 +359,23 @@ export const DataViewControl = defineComponent({ } >
+ {c.state.draggable && !c.state.readonly && ( + + + + + + + + )} {cardStyle.value === 'style2' && !c.state.singleSelect && ( onDraggableChange(evt, group?.key)} diff --git a/src/control/kanban/kanban.scss b/src/control/kanban/kanban.scss index 5c372a2effa175f8741a2b8d5f54127bf635bf26..c3d2acab4ff5531e213f11e763d74ad6695614dc 100644 --- a/src/control/kanban/kanban.scss +++ b/src/control/kanban/kanban.scss @@ -21,6 +21,11 @@ $control-kanban: ( } } + @include e(drag-icon) { + margin-right: getCssVar('spacing', 'tight'); + cursor: move; + } + @include e(content) { display: flex; flex-grow: 1; @@ -226,9 +231,18 @@ $control-kanban: ( @include when(selected) { background-color: getCssVar(control-kanban, selected-bg-color); } + @include when(disabled) { cursor: no-drop; } + + @include e(content) { + display: flex; + align-items: center; + width: 100%; + height: 100%; + } + @include e(bottom) { display: flex; align-items: center; diff --git a/src/control/kanban/kanban.tsx b/src/control/kanban/kanban.tsx index 0995ad9fd1e2420587281112eee1acffd01a118c..38510ce916618110102b490b990a8df787d7857a 100644 --- a/src/control/kanban/kanban.tsx +++ b/src/control/kanban/kanban.tsx @@ -361,9 +361,28 @@ export const KanbanControl = defineComponent({ onDbRowClick(item, event) } > - {panel - ? renderPanelItemLayout(item, panel) - : renderDefaultItem(item, group)} +
+ {c.state.draggable && !c.state.readonly && ( + + + + + + + + )} + {panel + ? renderPanelItemLayout(item, panel) + : renderDefaultItem(item, group)} +
); }; @@ -556,10 +575,11 @@ export const KanbanControl = defineComponent({ ]} > @@ -629,9 +630,33 @@ export const SwimlaneKanban = defineComponent({ onClick={() => c.onRowClick(element)} onDblclick={() => c.onDbRowClick(element)} > - {c.model.itemLayoutPanel - ? renderPanelItemLayout(lane, element) - : renderDefaultItem(lane, element, group)} +
+ {c.state.draggable && + !c.state.readonly && + c.draggableMode !== 0 && ( + + + + + + + + )} + {c.model.itemLayoutPanel + ? renderPanelItemLayout(lane, element) + : renderDefaultItem(lane, element, group)} +
); }, diff --git a/src/control/list/list.scss b/src/control/list/list.scss index f150cd44c7229f798f3377e94289e4dc8aa0b3fe..0f49e579d7a25ccadfe095d8571afd111fd07892 100644 --- a/src/control/list/list.scss +++ b/src/control/list/list.scss @@ -50,8 +50,8 @@ $control-list-group-style2: ( display: flex; align-items: center; justify-content: center; - color: getCssVar(color, text, 3); margin-top: getCssVar(spacing, tight); + color: getCssVar(color, text, 3); border: 2px dashed getCssVar(color, border); } } @@ -63,6 +63,10 @@ $control-list-group-style2: ( position: relative; height: 100%; + @include e(drag-icon) { + cursor: move; + } + @include e(nav-icon) { position: absolute; top: 18px; diff --git a/src/control/list/list.tsx b/src/control/list/list.tsx index ce0c5e57250ed9150a9e72f80bbfbabbfd4683c0..2919c2e68c19880e98710b2313bd42b3dd9317c3 100644 --- a/src/control/list/list.tsx +++ b/src/control/list/list.tsx @@ -360,6 +360,23 @@ export const ListControl = defineComponent({ style={cardStyle} class={[ns.b('scroll-item'), ns.is('active', isSelected(item))]} > + {c.state.draggable && !c.state.readonly && ( + + + + + + + + )} {c.model.controlStyle === 'EXTVIEW2' && !c.state.singleSelect && ( onDraggableChange(evt, group?.key)}