首页 > 技术文章 > props参数赋值给data

dianzan 2020-10-12 15:25 原文

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

 

推荐阅读