element icon indicating copy to clipboard operation
element copied to clipboard

When [Bug Report] before-upload returns false, the on-remove hook function is triggered

Open Cc9410 opened this issue 9 years ago • 3 comments

Element UI version

1.3.6

OS/Browsers version

mac os/chorme

Vue version

2.3.4

Reproduction Link

https://jsfiddle.net/ck4mkuso/

Steps to reproduce

1.成功上传图片后 给test赋值 2.重新上传图片 触发before-upload test存在 返回false 3.再重新上传图片,上传成功

What is Expected?

希望before-upload钩子函数返回false后不触发on-remove钩子函数

What is actually happening?

before-upload钩子函数返回false后触发on-remove钩子函数

Cc9410 avatar Jun 16 '17 08:06 Cc9410

Translation of this issue:

Element UI version

1.3.6

OS/Browsers version

Mac os/chorme

Vue version

2.3.4

Reproduction Link

https://jsfiddle.net/ck4mkuso/

Steps to reproduce

  1. after uploading the picture successfully, assign the value to test

  2. re upload pictures to trigger before-upload test exist, return false

  3. upload the picture again and upload it successfully

What is Expected?

I hope the before-upload hook function does not trigger the on-remove hook function when it returns false

What is actually happening?

The before-upload hook function returns false and triggers the on-remove hook function

element-bot avatar Jun 16 '17 08:06 element-bot

when the before-upload hook function returns false and it will trigger the on-remove hook function, it's design in , not a bug

baiyaaaaa avatar Jul 19 '17 00:07 baiyaaaaa

@baiyaaaaa 为什么要这么设计呢?不是很理解。毕竟我又不想移除它。

gooqiao avatar Dec 04 '18 09:12 gooqiao