0


vue3中使用nextTick

vue3中使用nextTick

vue2中使用

this.$nextTick(()=>{//你要执行的方法})

vue3中使用

1、引入nextTick

import{ nextTick }from'vue'

2、使用

setup(){const passwordRef =ref(null)nextTick(()=>{
      passwordRef.value.focus()})return{
      passwordRef 
      }}

本文转载自: https://blog.csdn.net/m0_50207524/article/details/130004156
版权归原作者 冯浩(grow up) 所有, 如有侵权,请联系我们删除。

“vue3中使用nextTick”的评论:

还没有评论