<div ref="divRef">div</div>
    <A ref='aRef'></A>

获取dom:

  mounted() {
    console.log(this.$refs.divRef)
    this.$refs.divRef.style.backgroundColor = 'red'
    console.log(this.$refs.aRef.$el)
    this.$refs.aRef.$el.style.backgroundColor = 'rgba(255,0,0,0.3)'
  }

注意:如果是获取组件A的dom,可以通过$el属性获取到~