Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
2 changes: 2 additions & 0 deletions packages/products/tdesign-mobile-vue/src/upload/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export default {
type: Boolean,
default: undefined,
},
/** 是否开启拖拽排序 */
draggable: Boolean,
/** 已上传文件列表,同 `value`。TS 类型:`UploadFile` */
files: {
type: Array as PropType<TdUploadProps['files']>,
Expand Down
5 changes: 5 additions & 0 deletions packages/products/tdesign-mobile-vue/src/upload/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface TdUploadProps<T extends UploadFile = UploadFile> {
* 是否禁用组件
*/
disabled?: boolean;
/**
* 是否开启拖拽排序
* @default false
*/
draggable?: boolean;
/**
* 已上传文件列表,同 `value`。TS 类型:`UploadFile`
* @default []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ beforeUpload | Function | - | stop one of files to upload。Typescript:`(file:
capture | String | - | \- | N
data | Object | - | extra request data of uploading. `formatRequest` can redefine all request data。Typescript:`Record<string, any> \| ((files: UploadFile[]) => Record<string, any>)` | N
disabled | Boolean | undefined | make upload to be disabled | N
draggable | Boolean | false | Whether to enable drag-and-drop sorting | N
files | Array | [] | `v-model:files` is supported。Typescript:`Array<T>` | N
defaultFiles | Array | [] | uncontrolled property。Typescript:`Array<T>` | N
format | Function | - | to redefine `UploadFile` data structure。Typescript:`(file: File) => UploadFile` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ beforeUpload | Function | - | 如果是自动上传模式 `autoUpload=true`,
capture | String | - | 图片选取模式,可选值为 camera (直接调起摄像头) | N
data | Object | - | 上传请求所需的额外字段,默认字段有 `file`,表示文件信息。可以添加额外的文件名字段,如:`{file_name: "custom-file-name.txt"}`。`autoUpload=true` 时有效。也可以使用 `formatRequest` 完全自定义上传请求的字段。TS 类型:`Record<string, any> \| ((files: UploadFile[]) => Record<string, any>)` | N
disabled | Boolean | undefined | 是否禁用组件 | N
draggable | Boolean | false | 是否开启拖拽排序 | N
files | Array | [] | 已上传文件列表,同 `value`。TS 类型:`UploadFile`。支持语法糖 `v-model:files`。TS 类型:`Array<T>` | N
defaultFiles | Array | [] | 已上传文件列表,同 `value`。TS 类型:`UploadFile`。非受控属性。TS 类型:`Array<T>` | N
format | Function | - | 转换文件 `UploadFile` 的数据结构,可新增或修改 `UploadFile` 的属性,注意不能删除 `UploadFile` 属性。`action` 存在时有效。TS 类型:`(file: File) => UploadFile` | N
Expand Down
37 changes: 37 additions & 0 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -143964,6 +143964,43 @@
"Object"
]
},
{
"id": 1753462702,
"platform_framework": [
"8"
],
"component": "Upload",
"field_category": 1,
"field_name": "draggable",
"field_type": [
"4"
],
"field_default_value": "false",
"field_enum": "",
"field_desc_zh": "是否开启拖拽排序",
"field_desc_en": "Whether to enable drag-and-drop sorting",
"field_required": 0,
"event_input": "",
"create_time": "2025-07-25 16:58:22",
"update_time": "2025-07-25 16:58:22",
"event_output": null,
"custom_field_type": null,
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"Vue(Mobile)"
],
"field_type_text": [
"Boolean"
]
},
{
"id": 2383,
"platform_framework": [
Expand Down