Skip to content

feat(chat): 优化拖拽上传逻辑与国际化支持#35

Merged
haruki1953 merged 7 commits intomasterfrom
fix/drag
Mar 27, 2026
Merged

feat(chat): 优化拖拽上传逻辑与国际化支持#35
haruki1953 merged 7 commits intomasterfrom
fix/drag

Conversation

@KIPPUDESU
Copy link
Copy Markdown
Collaborator

  • 逻辑重构:全面使用 Vue 指令(@drAg)替代原有的 onMounted 手动监听
  • 解决 v-if 导致的动画失效问题
  • 功能增强:添加拖拽区域的国际化文本支持
  • 状态优化:重构 upload-stores,优化文件/图片拖拽时的状态感应与数据包装逻辑

- 添加了文本的国家化支持
- 删除了冗余的文本注释
- 修改拖拽遮罩的父元素显示方式 从 v-if 改为 v-show,确保过度动画生效
- 将 `upload-file` 和 `upload-image` store 中用于暂存拖拽文件的 `useDropFiles` 和 `useDropImages` 更变为更易读的文件名,并且设置两个暴露接口确保了安全性
- 删除了拖拽页面的大小校验,让用户直接跳转到文件上传页接受警告
把注册的拖拽方法(钩子)删除,换成 Vue 提供的更简洁的方法
Copy link
Copy Markdown
Member

@haruki1953 haruki1953 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好棒好棒,我也是第一次review,话说你知道如何让review时能直接修改吗,我也不知道(

@haruki1953 haruki1953 merged commit 148e63e into master Mar 27, 2026
1 check passed
@KIPPUDESU KIPPUDESU deleted the fix/drag branch March 27, 2026 07:37
@haruki1953 haruki1953 mentioned this pull request Mar 27, 2026
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.

2 participants