HelloWorld.vue 957 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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"> Vite Docs </a>
  17. |
  18. <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
  19. </p>
  20. <button type="button" @click="count++"> count is: {{ count }} </button>
  21. <p>
  22. Edit
  23. <code>components/HelloWorld.vue</code> to test hot module replacement.
  24. </p>
  25. </template>
  26. <style scoped>
  27. a {
  28. color: #42b983;
  29. }
  30. label {
  31. margin: 0 0.5em;
  32. font-weight: bold;
  33. }
  34. code {
  35. padding: 2px 4px;
  36. color: #304455;
  37. background-color: #eee;
  38. border-radius: 4px;
  39. }
  40. </style>