Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload addOnPsting #1802

Merged
merged 5 commits into from
Sep 4, 2023
Merged

feat: upload addOnPsting #1802

merged 5 commits into from
Sep 4, 2023

Conversation

pointhalo
Copy link
Collaborator

@pointhalo pointhalo commented Sep 4, 2023

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Upload 支持读取粘贴板中的图片,自动添加到 fileList中
#1782 中未完善的地方做修改

  • API命名改为 addOnPasting(类似于 TagInput中的 addOnBlur的命名逻辑)
  • 拆分 permission 检查与 修改 fileList 的逻辑
  • 读取粘贴板,不应为阻塞性操作,去掉 await ,改为 promise then回调
  • 兼容 mac 操作系统的键盘操作
  • disabled时,无需添加事件监听器
  • 补充 markdown文档说明
  • 去掉多余的imgList,无需为了 pasting 专门多建一个 state承载;且不应该直接操作 fileList,应与主动选择文件一样,保持通过 handleChange承载file追加相关逻辑,否则 maxSize、minSize、limit等检测操作流程会被跳过

Changelog

🇨🇳 Chinese


🇺🇸 English

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

ChuTingzj and others added 2 commits September 1, 2023 16:37
* feat: support upload by pasting operation (#1612)
* feat: upload by CtrlV operation(#1612)

---------

Co-authored-by: zhangjing <[email protected]>
Co-authored-by: pointhalo <[email protected]>
@pointhalo pointhalo changed the base branch from main to release September 4, 2023 10:25
@pointhalo pointhalo requested a review from YannLynn September 4, 2023 10:25
@pointhalo pointhalo changed the title Feat upload pasting feat: upload addOnPsting Sep 4, 2023
@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 4, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit bf4226f:

Sandbox Source
pr-story Configuration
Semi Design: Simple Story Configuration

@YannLynn YannLynn merged commit bbe58f9 into release Sep 4, 2023
@YannLynn YannLynn deleted the feat-uploadPasting branch September 4, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants