1.$refs使用时机
尝试在watch的时候使用$refs,发现里面都是空的,然后google了一下,$refs需要在整个组件挂载完成后才能使用
解决方法:使用setTimeout
setTImeout(()=>{ this.$refs['xxxx'] }, 0)