index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="loading-container" v-if="loading">
  3. <div class="content-shadow">
  4. <div id="svg-loading">
  5. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin:auto;background:#fff;display:block;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
  6. <text x="50" y="50" text-anchor="middle" dy="0.38em" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="#2abed1" stroke-width="0.6000000000000001" font-size="22" font-family="arial">
  7. 剑鱼标讯
  8. <animate attributeName="stroke-dasharray" repeatCount="indefinite" calcMode="spline" dur="3.0303030303030303s" values="0 100;100 100;0 100" keyTimes="0;0.5;1" keySplines="0.3 0 0.7 1;0.3 0 0.7 1"></animate>
  9. <animate attributeName="stroke-dashoffset" repeatCount="indefinite" dur="3.0303030303030303s" values="0;0;-100" keyTimes="0;0.5;1"></animate>
  10. </text>
  11. </svg>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'LogoLoading',
  19. props: {
  20. loading: {
  21. type: Boolean,
  22. default: true
  23. }
  24. }
  25. }
  26. </script>
  27. <style scoped>
  28. .loading-container {
  29. display: flex;
  30. width: 100%;
  31. height: 100%;
  32. padding: 24px;
  33. box-sizing: border-box;
  34. }
  35. .content-shadow {
  36. display: flex;
  37. align-items: center;
  38. justify-content: center;
  39. width: 100%;
  40. }
  41. </style>