vue 学习3

  1. 在 2.5.0 及以上版本中,如果你使用了单文件组件
    $children,$slots,$attrs ....
    $attrs 可以透传props

注意.模板标签上有:属性=“a”,时候,值为data函数中返回值中属性“a”对应的值(或是computed中对应属性的值,或是props对应的值),而不是一个字符串的意思
3. this.$emit 回调函数

            handleClickLink (event) {
                this.$emit('click', event);
            }
原文地址:https://www.cnblogs.com/Running00/p/11693566.html