亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - How to actively trigger the change event of the checkbox component in the ElementUI library of Vue.js?
伊謝爾倫
伊謝爾倫 2017-06-28 09:23:06
0
3
2663

Work on a project and encounter an actual scenario.
First level: a checkbox_1 (for example, bound to the change event method cevt1). After triggering, select all items in the second-level checkboxgroup (normal use) .

The problem is, when checkbox_2 of the checkboxgroup in the second level (for example, the checkbox of the sub-level is bound to the change event method cevt2) is selected, it should normally trigger all checkbox_3 selected in the corresponding checkboxgroup of the third level. ,

In fact, when checkbox_1 in the first level is triggered, cevt1 is triggered normally, but it is found that the change event cevt2 bound to checkbox_2 in the "second level" has not been called. Is there any solution?

伊謝爾倫
伊謝爾倫

小伙看你根骨奇佳,潛力無限,來學(xué)PHP伐。

reply all(3)
伊謝爾倫

Vue's change method seems to only respond to data changes caused by clicks and v-bind data binding. Other data changes will not trigger the change event. You can try to use the $emit method to manually call checkbox_2's change event.

See:
https://cn.vuejs.org/v2/api/#...

世界只因有你

Try using watch to listen for changes in the value bound to the checkbox

給我你的懷抱

/q/10... Can you give a more detailed answer to this post? What is stored in the store from the router? ? Newbie

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template