HelloWorld.vue 520 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="hello">
  3. <h1>{{ msg }}</h1>
  4. </div>
  5. </template>
  6. <script lang="ts">
  7. import { defineComponent } from 'vue';
  8. export default defineComponent({
  9. props: {
  10. msg!: String,
  11. },
  12. setup(props) {
  13. console.log(props.msg);
  14. },
  15. });
  16. </script>
  17. <!-- Add "scoped" attribute to limit CSS to this component only -->
  18. <style scoped lang="scss">
  19. h3 {
  20. margin: 40px 0 0;
  21. }
  22. ul {
  23. list-style-type: none;
  24. padding: 0;
  25. }
  26. li {
  27. display: inline-block;
  28. margin: 0 10px;
  29. }
  30. a {
  31. color: #42b983;
  32. }
  33. </style>