vue中的const{XXX}=this的作⽤效果样例1:
const { xxx } = this.state;
上⾯的写法是es6的写法,其实就相当于:
const xxx =
样例2:
const {comment,index,deleteComment} = thisconst的作用
上⾯的这句话是⼀个简写,最终的含义相当于
const comment = thisment
const index = this.index
const deleteComment = this.deleteComment
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论