javascript - vue component binding computed method return value, binding exception occurs?
某草草
某草草 2017-06-26 10:54:52
0
3
906

As shown in the picture, add the code

Component p.star is bound to the value returned by the calculated attribute method

This is a computed property

Finally a binding exception broke out

某草草
某草草

reply all(3)
淡淡烟草味

props: {
    size: {
        type: Number
    },
    score: {
        type: Number
    }
},

computed: {
    starType() {
        return "star-" + this.size;
    }
}
女神的闺蜜爱上我

:class="starType" 改成 v-model="starType"

女神的闺蜜爱上我

computed seems to be written in props, so the error is reported

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