element icon indicating copy to clipboard operation
element copied to clipboard

The [Bug Report] select component A modifies the select component B in the change event, causing a dead loop

Open zuimeiaj opened this issue 9 years ago • 3 comments

Element UI version

1.4.2

OS/Browsers version

OSX 10.12 /chrome 60

Vue version

2.4.2

Reproduction Link

https://jsfiddle.net/zuimeiaj/d7s0wxz2/

Steps to reproduce

1.直接打开页面

What is Expected?

count 应该为 0,且select组件不应该在初始化时候触发change事件

What is actually happening?

count值为100

zuimeiaj avatar Aug 18 '17 12:08 zuimeiaj

Translation of this issue:

Element UI version

1.4.2

OS/Browsers version

OSX 10.12 /chrome 60

Vue version

2.4.2

Reproduction Link

https://jsfiddle.net/zuimeiaj/d7s0wxz2/

Steps to reproduce

  1. open the page directly

What is Expected?

The count should be 0, and the select component should not trigger the change event at initialization time

What is actually happening?

The count value is 100

element-bot avatar Aug 18 '17 12:08 element-bot

方法名后面不要加括号,否则就是调用了:https://jsfiddle.net/d7s0wxz2/1/

另外,:change 写法不对,应该是 @change。

在使用 Element 前请阅读 Vue 文档。

Leopoldthecoder avatar Aug 18 '17 12:08 Leopoldthecoder

好的,谢谢。整飚了

zuimeiaj avatar Aug 18 '17 12:08 zuimeiaj