index.vue 649 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!-- 系统logo -->
  2. <template>
  3. <div class="art-logo">
  4. <img :style="logoStyle" src="@/assets/img/favicon.ico" alt="logo" style="border-radius: 50%" />
  5. </div>
  6. </template>
  7. <script setup lang="ts">
  8. defineOptions({ name: 'ArtLogo' })
  9. interface Props {
  10. /** logo 大小 */
  11. size?: number | string
  12. }
  13. const props = withDefaults(defineProps<Props>(), {
  14. size: 36
  15. })
  16. const logoStyle = computed(() => ({ width: `${props.size}px` }))
  17. </script>
  18. <style lang="scss" scoped>
  19. .art-logo {
  20. display: flex;
  21. align-items: center;
  22. justify-content: center;
  23. img {
  24. width: 100%;
  25. height: 100%;
  26. }
  27. }
  28. </style>