javascript - How to use v-model to display an array in vue radio button
黄舟
黄舟 2017-05-19 10:29:59
0
1
553

As shown in the picture, I want to push a value after selecting it. How should I do it? Thank you

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
滿天的星座

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

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