iview / iview

A high quality UI Toolkit built on Vue.js 2.0
http://iview.talkingdata.com
Other
23.96k stars 4.14k forks source link

[Bug Report]Collapse v-model bug #3467

Open Abiel1024 opened 6 years ago

Abiel1024 commented 6 years ago

Environment

Latest version of Vue And Chrome

Reproduction link

https://jsfiddle.net/jps4mdxo/

Steps to reproduce

When setting Panel data, set the v-model value of Collapse

What is expected?

The value of v-model is valid

What is actually happening?

The value of v-model is invalid

1862 commented 6 years ago
this.$nextTick(function() {
    this.value1 = '11';
});
Abiel1024 commented 6 years ago

@1862 This can solve the problem, but will this solution consume more resources?

1862 commented 6 years ago

it should be , cause it push a function to microtask or task.

David-Tsui commented 6 years ago

@Abiel1024 No, it's just a standard api when dynamic setting some data which is associated with UI.

Abiel1024 commented 6 years ago

@David-Tsui Maybe we should think of a better solution