element-plus [Component] [input-number] The modelValue update from the component input action is inconsistent with the display value

bweufnob  于 2022-11-05  发布在  其他
关注(0)|答案(1)|浏览(142)

Bug Type:Component

Environment

  • Vue Version: 3.2.37
  • Element Plus Version: 2.2.18
  • Browser / OS: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
  • Build Tool: Vite

Reproduction

  • el-input-number

Element Plus Playground

Steps to reproduce

1.value is a mutiple object array,it shows a mutiple input-number componets.
2.when this initial value was all 1, then decrease any one of not the last component.I delete the value of object equal 0 because it will not display.

What is Expected?

the component of the value equal 0 was disappear,and other components' display is right.

What is actually happening?

the next component's value was 0 not 1,it's unexpectation.

Additional comments

  • (empty)*

tkclm6bt

tkclm6bt1#

I add nextTick in change method to solve the problem temporarily, demo

Maybe something wrong when vue update doms

相关问题