# sort-draggable

### 说明

拖放排序组件

### 演示

{% embed url="<https://codesandbox.io/s/businessdraggable-74zlf>" %}

### 源码

<https://github.com/ddzy/ts-utility-plugins/tree/master/src/ddzy/business/draggable/sort-draggable>

### 配置

| Name                  | Type                                                                      | Description | Required |
| --------------------- | ------------------------------------------------------------------------- | ----------- | -------- |
| container             | string                                                                    | 挂载到的 DOM 容器 | true     |
| dataSource            | <p>Array<{</p><p>  titleText?: string; contentText?: string;</p><p>}></p> | 数据源         | false    |
| animate               | boolean                                                                   | 是否开启拖拽动画    | false    |
| dragWrapperStyle      | object                                                                    | 拖拽容器的样式     | false    |
| dragOriginStyle       | object                                                                    | 拖拽对象的默认样式   | false    |
| dragOriginActiveStyle | object                                                                    | 拖拽对象被拖拽时的样式 | false    |
| dragTargetActiveStyle | object                                                                    | 交换目标的活跃样式   | false    |
| onDragStartHook       | (origin: HTMLElement) => void                                             | \*          | false    |
| onDragEnterHook       | (origin: HTMLElement) => void                                             | \*          | false    |
| onDragLeaveHook       | (origin: HTMLElement) => void                                             | \*          | false    |
| onDragOverHook        | (origin: HTMLElement) => void                                             | \*          | false    |
| onDropHook            | (origin: HTMLElement) => void                                             | \*          | false    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ddzy.gitbook.io/ts-utility-plugins-docs/business/business-draggable/sort-draggable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
