HelloWorld.vue 965 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <script setup lang="ts">
  2. import { ref } from 'vue'
  3. defineProps<{ msg: string }>()
  4. const count = ref(0)
  5. </script>
  6. <template>
  7. <h1>{{ msg }}</h1>
  8. <p>
  9. Recommended IDE setup:
  10. <a href="https://code.visualstudio.com/" target="_blank">VSCode</a>
  11. +
  12. <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
  13. </p>
  14. <p>See <code>README.md</code> for more information.</p>
  15. <p>
  16. <a href="https://vitejs.dev/guide/features.html" target="_blank">
  17. Vite Docs
  18. </a>
  19. |
  20. <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
  21. </p>
  22. <button type="button" @click="count++">count is: {{ count }}</button>
  23. <p>
  24. Edit
  25. <code>components/HelloWorld.vue</code> to test hot module replacement.
  26. </p>
  27. </template>
  28. <style scoped>
  29. a {
  30. color: #42b983;
  31. }
  32. label {
  33. margin: 0 0.5em;
  34. font-weight: bold;
  35. }
  36. code {
  37. background-color: #eee;
  38. padding: 2px 4px;
  39. border-radius: 4px;
  40. color: #304455;
  41. }
  42. </style>