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

upload组件 vue2.6x版本以上不兼容 #207

Closed
439740394 opened this issue Apr 26, 2020 · 9 comments
Closed

upload组件 vue2.6x版本以上不兼容 #207

439740394 opened this issue Apr 26, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@439740394
Copy link

最新版本

element-ui

upload 上传 设置value时 报错
<transition-group> children must be keyed: <li>

@xaboy
Copy link
Owner

xaboy commented Apr 26, 2020

我检查一下

@LoneKingCode
Copy link

更新了下也发现了,上传后
[Vue warn]: children must be keyed:

  • @xaboy
    Copy link
    Owner

    xaboy commented May 4, 2020

    @LoneKingCode 我这边没有复现出来,这是 ui 库报的错还是 form-create 报的错?

    @LoneKingCode
    Copy link

    @LoneKingCode 我这边没有复现出来,这是 ui 库报的错还是 form-create 报的错?

    "vue": "^2.6.11", "@form-create/element-ui": "^1.0.12",
    vue的错, 和1楼的错误一样,在上传文件结束的事件onSuccess执行完之后,提示,
    但是我看你代码那每个组件也都设置了unique key了

    @LoneKingCode
    Copy link

    image

    @xaboy
    Copy link
    Owner

    xaboy commented May 4, 2020

    可能是 ElementUI 报的错

    @LoneKingCode
    Copy link

    可能是 ElementUI 报的错

    今天闲了看了下element ui 的upload组件代码,发现了问题所在。
    file的uid问题, element ui 的upload组件是以file.uid为li标签的key的,而作者对于filelist转换时,只根据url提取了文件名,以及url,缺少一个uid字段,导致element ui报错。
    下面这两张是单独修改element ui的upload组件后就正常,设置index为key
    111
    222
    作者这应该加个字段uid,然后就可以工作了
    333

    希望作者及时更新下。

    @xaboy
    Copy link
    Owner

    xaboy commented Jul 30, 2020

    感谢反馈,下个版本修复 @LoneKingCode

    @xaboy xaboy added the bug Something isn't working label Jul 30, 2020
    @xaboy xaboy closed this as completed in 14e5456 Aug 7, 2020
    @xaboy
    Copy link
    Owner

    xaboy commented Aug 12, 2020

    1.0.18版本已修复

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    bug Something isn't working
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants