Vue.js中ref ($refs)坑点

通过 :ref =某变量 添加ref(即加了:号) ,如果想获取该ref时需要加 [0],如this.$refs[refsArrayItem] [0];如果不是:ref =某变量的方式而是 ref =某字符串时则不需要加,如this.$refs[refsArrayItem]

posted on 2021-12-15 21:50  zhangzongshan  阅读(171)  评论(0编辑  收藏  举报

导航