<div id="app" v-cloak>
  我的名字是:{{ myName }}
  <br>
  <input type="text" v-model="myName">
</div>
<div id="loader"></div>


[v-cloak] + #loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
}

[v-cloak] + #loader:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #ccc;
  border-top-color: #333;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
Vue.createApp({
  setup() {
    const myName = Vue.ref('Ray');
    return {
      myName,
    }
  }
}).mount('#app');

External CSS

  1. https://unpkg.com/vue@next

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.37/vue.global.prod.min.js