As shown in the picture, I want to push a value after selecting it. How should I do it? Thank you
人生最曼妙的风景,竟是内心的淡定与从容!
js
new Vue({ el: "#app", data: { myCheck: '', //用来存放每一次点击的value arr: [] }, watch: { myCheck: function () { this.arr.push(this.myCheck) } } })
What does this mean? ? Every time you click, the value after the click is saved
js
What does this mean? ? Every time you click, the value after the click is saved