nextTick 问题:更新响应式数据,并不能立即获取到最新的DOM <div id="foo">hello, {{ name }}</div> const name = ref('world') setTimeout(() => { name.value = 'sky' console.log('updated', document.querySelector('#foo').innerHTML) // hello, world }, 2000) 解决方法:使用 nextTick() const name = ref('world') setTimeout(() => { name.value = 'sky' nextTick(() => { console.log('updated',