Vue学习记录--父组件给子组件用props

    props: {
            //primary,warning,green,danger,white,black,gray
            type: {
                type: String,
                default: 'primary'
            },
            // '', small
            size: {
                type: String,
                default: ''
            },
            //是否是圆点
            dot: {
                type: Boolean,
                default: false
            },
            //是否可见
            visible: {
                type: Boolean,
                default: true
            }

官方文档 https://cn.vuejs.org/v2/guide/components-props.html#ad

原文地址:https://www.cnblogs.com/cqqinjie/p/13261164.html