实现一个像这样的五星打分
export default { data() { return { score: 0, content: '', star: [0,1,2,3,4], s_l: -1, old_index: null, } }, computed: { ...mapState(['userInfo']) }, methods: { getStar(index) { if (this.old_index == index) { this.s_l = index - 1; this.score--; this.old_index--; return } this.s_l = index; this.score = index+1; this.old_index = index; } } }评价
{ {score}}分