element ui组件中element.style怎么改详解

  mounted () {

  // 最好第一次查找自己定义的class(eldrawer)名,以免影响其他该组件

  var a = document.getElementsByClassName("eldrawer")[0]

  console.log(a);

  var b = a.getElementsByClassName('el-drawer__container')[0]

  console.log(b);

  var c = b.getElementsByClassName('el-drawer')[0]

  console.log(c);

  c.style.width = ' 60%'

  //document.getElementsByClassName("el-drawer__wrapper")[0].getElementsByClassName('el-drawer__container')[0].getElementsByClassName('el-drawer')[0].style.width = ' 60%'

  }