props参数赋值给data

export default {
    props:['ctype'],
    computed: {
      normalizedSize: function () {
        return this.ctype.trim().toLowerCase()
      }
    },
    data(){
        return{
            thistype:this.ctype
        }
    }
}

 

posted @ 2020-10-12 15:25  ThisCall  阅读(958)  评论(0编辑  收藏  举报