ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.1k stars 14.64k forks source link

When the [bug report] slider component is initialized, it still sends out input events, but in some cases, it is not practical #19108

Open bigfacewo opened 4 years ago

bigfacewo commented 4 years ago

Element UI version

2.9.1

OS/Browsers version

macos10.15.3 / chrome 80.0.3987.149

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/kdouans2/

Steps to reproduce

打开重现链接,接着打开控制台发现有两个输出"input change"

What is Expected?

没有任何输出,也就是说初始化slider组件不要触发input或者change事件。

What is actually happening?

有两个输出"input change",可以发现初始化时就触发了两次。

element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.9.1

OS/Browsers version

macos10.15.3 / chrome 80.0.3987.149

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/kdouans2/

Steps to reproduce

Open the replay link, and then open the console to find that there are two output "input changes"

What is Expected?

There is no output, that is, initializing the slider component does not trigger input or change events.

What is actually happening?

There are two output "input changes" that you can see are triggered twice during initialization.

bigfacewo commented 4 years ago

现在可以自己封装一层,如果数据一样,就不发送input事件。

Now I can encapsulate one layer by myself. If the data is the same, I will not send the input event.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.