获取您自己的 Vue 服务器
App.vue
main.js
 
<template>
  <h1>&lt;template&gt; Example</h1>
  <p>Use the button to toggle a section of HTML code.</p>
  <button v-on:click="display = !display">Toggle</button>
  <h4>Beautiful Places</h4>
  <ul>
    <li>Trolltunga</li>
    <template v-if="display">
      <li>Potato Point</li>
      <li>The souks of Marrakech</li>
      <li>Dry Tortugas</li>
      <li>Halong Bay</li>
    </template>
    <li>...</li>
  </ul>
<p>This list could go on forever:)</p>

</template>

<script>
export default {
  data() {
    return {
      display: false
    };
  }
}
</script>                  
import { createApp } from 'vue'

import App from './App.vue'

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