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

[t-upload] 首次上传后图片没有预览显示 #3194

Closed
danielyangfei opened this issue Oct 12, 2024 · 6 comments
Closed

[t-upload] 首次上传后图片没有预览显示 #3194

danielyangfei opened this issue Oct 12, 2024 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@danielyangfei
Copy link

tdesign-miniprogram 版本

1.6.1

重现链接

No response

重现步骤

.wxml
<t-upload
draggable
media-type="{{['video','image']}}"
files="{{originFiles}}"
gridConfig="{{gridConfig}}"
bind:add="handleAdd"
bind:remove="handleRemove"
bind:click="handleClick"

.js
data:{
originFiles: [

],
gridConfig: {
  column: 3,
  width: 180,
  height: 180,
},

}

handleAdd(e){
const { files } = e.detail;
console.log(e)
this.setData({originFiles:e.detail.files})
},

期望结果

上传并展示

实际结果

首次不能展示预览 第二次又可以

基础库版本

No response

补充说明

Copy link
Contributor

👋 @danielyangfei,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@danielyangfei
Copy link
Author

default.mov

@jarmywang
Copy link
Collaborator

@danielyangfei 感谢反馈,不过我按照你的代码没有复现,麻烦你参考文档示例再看看

@danielyangfei
Copy link
Author

@danielyangfei 感谢反馈,不过我按照你的代码没有复现,麻烦你参考文档示例再看看

模拟器上面没问题,但是真机上会有问题。
表现:

  1. 首次上传图片 loading 后不展示
  2. 再次上传后,会重复展示上次上传的结果

issue 中我看很多人也在反馈相同的问题

@danielyangfei
Copy link
Author

@danielyangfei 感谢反馈,不过我按照你的代码没有复现,麻烦你参考文档示例再看看

采用了#3015 中说的 去掉 draggable 解决了问题 感觉这个属性应该是有啥影响的

@anlyyao
Copy link
Collaborator

anlyyao commented Oct 24, 2024

Duplicate of #3015

@anlyyao anlyyao marked this as a duplicate of #3015 Oct 24, 2024
@anlyyao anlyyao closed this as completed Oct 24, 2024
@github-actions github-actions bot added the duplicate This issue or pull request already exists label Oct 24, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants