index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <svg
  3. :id="fjId"
  4. version="1.1"
  5. xmlns="http://www.w3.org/2000/svg"
  6. xmlns:xlink="http://www.w3.org/1999/xlink"
  7. viewBox="0 0 93.5 96.5"
  8. enable-background="new 0 0 93.5 96.5"
  9. xml:space="preserve"
  10. :width="fjWidth"
  11. :height="fjHeight"
  12. >
  13. <defs>
  14. <rect
  15. id="SVGID_1_"
  16. x="-260.14"
  17. y="-365.945"
  18. width="595.28"
  19. height="841.89"
  20. />
  21. <rect
  22. id="SVGID_3_"
  23. x="-260.14"
  24. y="-365.945"
  25. width="595.28"
  26. height="841.89"
  27. />
  28. </defs>
  29. <clipPath id="SVGID_2_">
  30. <use xlink:href="#SVGID_1_" overflow="visible" />
  31. </clipPath>
  32. <clipPath id="SVGID_4_">
  33. <use xlink:href="#SVGID_3_" overflow="visible" />
  34. </clipPath>
  35. <g>
  36. <path
  37. fill="#D8D8D8"
  38. d="M45.96,39.183l-2.22,50.288c0,0,1.916,0.747,3.605,0.747c1.738,0,3.752-0.747,3.752-0.747l-2.181-50.288
  39. H45.96z"
  40. />
  41. </g>
  42. <g>
  43. <g>
  44. <path
  45. :fill="background"
  46. d="M45.427,37.35l3.854,1.471c0,0,10.131-21.287,10.834-32.815C52.61,15.16,45.427,37.35,45.427,37.35"
  47. />
  48. <path
  49. :fill="background"
  50. d="M49.088,38.821l-3.163,2.647c0,0,13.648,19.221,23.373,25.454C64.962,55.908,49.088,38.821,49.088,38.821"
  51. />
  52. <path
  53. :fill="background"
  54. d="M45.749,41.592l0.022-4.125c0,0-23.489-2-34.528,1.396C22.452,42.669,45.749,41.592,45.749,41.592"
  55. />
  56. </g>
  57. <g>
  58. <path
  59. fill="#D8D8D8"
  60. d="M49.095,38.328l11.02-32.752c0,0-0.102,2.009-0.186,2.674c-0.068,0.56-0.282,1.67-0.402,2.222
  61. c-0.1,0.454-0.421,1.81-0.421,1.81s-0.583,2.35-0.815,3.123c-0.767,2.562-2.484,7.63-3.438,10.129
  62. c-0.805,2.119-2.529,6.314-3.434,8.393c-0.492,1.132-2.029,4.5-2.029,4.5"
  63. />
  64. <path
  65. fill="#D8D8D8"
  66. d="M46.446,41.545l23.227,25.585c0,0-1.705-1.066-2.244-1.465c-0.457-0.334-1.32-1.061-1.744-1.436
  67. c-0.348-0.307-1.375-1.248-1.375-1.248s-1.769-1.656-2.33-2.234c-1.863-1.918-5.451-5.889-7.17-7.938
  68. c-1.456-1.737-4.28-5.287-5.654-7.091c-0.748-0.98-2.939-3.965-2.939-3.965"
  69. />
  70. <path
  71. fill="#D8D8D8"
  72. d="M45.376,37.815l-34.535,1.201c0,0,1.915-0.614,2.569-0.768c0.548-0.131,1.662-0.324,2.22-0.406
  73. c0.459-0.066,1.843-0.241,1.843-0.241s2.405-0.28,3.211-0.335c2.667-0.181,8.015-0.356,10.691-0.345
  74. c2.267,0.01,6.798,0.149,9.064,0.265c1.231,0.064,4.926,0.318,4.926,0.318"
  75. />
  76. </g>
  77. <animateTransform
  78. attributeName="transform"
  79. attributeType="XML"
  80. type="rotate"
  81. from="0 46.75 39.182"
  82. to="359 46.75 39.182"
  83. :dur="rotate"
  84. repeatCount="indefinite"
  85. />
  86. </g>
  87. <g>
  88. <path
  89. fill="#60BFD6"
  90. d="M42.686,39.182c0,2.504,2.117,4.545,4.732,4.545s4.733-2.041,4.733-4.545c0-2.512-2.118-4.544-4.733-4.544
  91. S42.686,36.67,42.686,39.182"
  92. />
  93. </g>
  94. <g>
  95. <path
  96. fill="#B1E1EB"
  97. d="M44.4,39.182c0,1.561,1.353,2.831,3.017,2.831c1.663,0,3.02-1.27,3.02-2.831c0-1.56-1.356-2.829-3.02-2.829
  98. C45.753,36.353,44.4,37.622,44.4,39.182"
  99. />
  100. </g>
  101. </svg>
  102. </template>
  103. <script>
  104. export default {
  105. // 名称
  106. name: "fj",
  107. props: {
  108. id: {
  109. type: String,
  110. default: "fj-1",
  111. },
  112. speed: {
  113. type: Number || String,
  114. default: "0.5s",
  115. },
  116. color: {
  117. type: String,
  118. default: "#4b55ae",
  119. },
  120. width:{
  121. type: String,
  122. default: "43px",
  123. },
  124. height:{
  125. type: String,
  126. default: "46px",
  127. }
  128. },
  129. // 数据
  130. data() {
  131. return {
  132. fjId: "",
  133. rotate: "",
  134. background: "",
  135. fjWidth:"",
  136. fjHeight:""
  137. };
  138. },
  139. // 函数
  140. methods: {},
  141. created() {
  142. this.fjId = this.id;
  143. this.rotate = this.speed;
  144. this.background = this.color;
  145. this.fjWidth = this.width;
  146. this.fjHeight = this.height;
  147. },
  148. mounted() {},
  149. unmounted() {},
  150. watch: {
  151. id(res) {
  152. this.fjId = res;
  153. },
  154. speed(res) {
  155. this.rotate = res;
  156. },
  157. color(res) {
  158. this.background = res;
  159. },
  160. width(res) {
  161. this.fjWidth = res;
  162. },
  163. height(res) {
  164. this.fjHeight = res;
  165. },
  166. },
  167. };
  168. </script>
  169. <style lang="less" scoped>
  170. </style>