Directive inserts a div when component mounted, but the div disappears when the ref updates the data in Vue3, and it's normal in Vue2
Version
3.0.7
Reproduction link
https://codesandbox.io/s/nice-darwin-bb189?file=/src/main.js
Steps to reproduce
1、open Reproduction link 2、look main.js and App.vue
What is expected?
the “loading...“ DOM display
What is actually happening?
the “loading...“ DOM disappears
A workaround, use a span
tag to wrap the {{ number }}
:
<div v-loading="loading"><span>{{ number }}</span></div>