获取您的 自己的 Vue 服务器
App.vue
main.js
 
<template>
  <div>
    <h2>Example $el Object</h2>
    <p>Using the $el object to change the background color root DIV tag.</p>
    <button v-on:click="changeColor">Click here</button>
  </div>
</template>

<script>
export default {
  methods: {
    changeColor() {
      this.$el.style.backgroundColor = 'lightgreen';
    }
  }
}
</script>                  
import { createApp } from 'vue'

import App from './App.vue'

const app = createApp(App)
app.mount('#app')
                  
https://127.0.0.1:5173/