Tencent / Tencent/tdesign-miniprogram
[t-upload] 建议支持自定义 files 属性内的 status 文案,建议支持设置视频相关属性,强烈建议支持按照上传文件类型分别限制文件上传数量
Open
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 1.8k
- Forks
- 337
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 19
Description
这个功能解决了什么问题
建议支持自定义 files 属性内的 status 文案
- 我们经常有一个上传审核场景,假设当用户一次性选择9个文件上传的时候,对于没有审核通过的文件,我们可以在 status 文案中定义简短描述,而不是一律显示“上传失败”,这样提醒更为明确。
建议支持设置视频相关属性
- 当上传视频文件的时候,我目前没有找到 t-upload 组件如何正常设置预览的视频属性,比如定义是否显示滚动条、是否自动播放等等,即使我知道视频原始组件有这些功能。
强烈建议支持按照上传文件类型分别限制文件上传数量
- 就像是微信发表朋友圈那样,当拉起文件选择页面的时候,只能选择1个视频或者1~9张图片,这样在遇到即可以上传图片又可以上传视频的场景下非常有用!
你建议的方案是什么
关于建议支持自定义 files 属性内的 status 文案
- 方案一:现存的 status 4 个状态保持不变(loading reload failed done),另外支持传入自定义状态,自定义状态包含状态名、状态icon、状态文案(如 status:"solution"、icon:"emo-emotional"、text:"审核失败",另外如果不提供状态文案或状态文案为空串,可以考虑状态icon垂直居中)
- 方案二:定义现存的 status 3 个状态(loading reload failed)的 状态icon 和 状态文案,另外如果提供状态文案为空串,可以考虑状态icon垂直居中
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the t-upload component's current files and status API, then inspect how video preview properties and per-file-type limits are currently handled. The issue does not name files or tests; completion would require an agreed scope and tests or examples covering the selected status, video, and file-type limit behaviors.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100