关于 setup()中动态获取 dom 需要 先 nextTick() 后再获取,不然获取的dom可能是不完整的 import { nextTick} from "vue"; …… const funName= async () => { await nextTick(); } 相关文章: