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

fix: 传图多选,joinValues为false的时候,render死循环问题修复 #7193

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

joelost
Copy link

@joelost joelost commented Jun 15, 2023

What

🤖 Generated by Copilot at 2a146fc

Fixed a bug in InputImage component that prevented the image preview from updating correctly. Improved the logic for checking the value changes in packages/amis/src/renderers/Form/InputImage.tsx.

🤖 Generated by Copilot at 2a146fc

value may vary
preview image follows change
autumn leaves falling

Why

How

🤖 Generated by Copilot at 2a146fc

  • Fix a bug where the image preview would not update when adding or removing images (link)

@github-actions github-actions bot added the feat label Jun 15, 2023
@github-actions
Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@joelost joelost changed the title feat: 传图多选,joinValues为false的时候,render死循环问题修复 fix: 传图多选,joinValues为false的时候,render死循环问题修复 Jun 15, 2023
@2betop
Copy link
Collaborator

2betop commented Jun 15, 2023

感谢反馈,不过问题不在那,而是少了 id 属性导致每次都在变

@joelost
Copy link
Author

joelost commented Jun 15, 2023

感谢反馈,不过问题不在那,而是少了 id 属性导致每次都在变

谢谢大佬纠正。

@joelost
Copy link
Author

joelost commented Jun 15, 2023

感谢反馈,不过问题不在那,而是少了 id 属性导致每次都在变

我本地改成你说的 || guid(),验证不成功,还是进入了不停渲染情况。

@2betop
Copy link
Collaborator

2betop commented Jun 15, 2023

应该是图片加载完后会更新图片大小信息吧,等图片都加载完一次就没有了

@joelost
Copy link
Author

joelost commented Jun 16, 2023

应该是图片加载完后会更新图片大小信息吧,等图片都加载完一次就没有了

if (prevProps.value !== props.value) { 这边value假如是array数组,会不会一直成立呢?

@2betop
Copy link
Collaborator

2betop commented Jun 16, 2023

应该是图片加载完后会更新图片大小信息吧,等图片都加载完一次就没有了

if (prevProps.value !== props.value) { 这边value假如是array数组,会不会一直成立呢?

是同一个数组就没问题

@hsm-lv hsm-lv merged commit dfadfed into baidu:master Jun 16, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants