vue ref获取实例子undefined 这个昵称很好记 2023-06-26 80 阅读1分钟 当你再created中使用 this.$refs时 dom没有加载成功 所以为undefined 所以你要是想获取 1、要么写在mounted中 dom已经加载完成 2、使用this.$nextTick(function(){})