feat: 完全移除svg
@ -7,8 +7,6 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
AB6693CA2E65C94400BCAAC1 /* SVGKit in Frameworks */ = {isa = PBXBuildFile; productRef = AB6693C92E65C94400BCAAC1 /* SVGKit */; };
|
||||
AB6693CC2E65C94400BCAAC1 /* SVGKitSwift in Frameworks */ = {isa = PBXBuildFile; productRef = AB6693CB2E65C94400BCAAC1 /* SVGKitSwift */; };
|
||||
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */ = {isa = PBXBuildFile; productRef = AB6695262E67015600BCAAC1 /* WaterfallGrid */; };
|
||||
AB8773632E4E04400071CB53 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = AB8773622E4E040E0071CB53 /* .gitignore */; };
|
||||
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = ABC150C02E5DB39A00A1F970 /* Lottie */; };
|
||||
@ -78,8 +76,6 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
AB6693CC2E65C94400BCAAC1 /* SVGKitSwift in Frameworks */,
|
||||
AB6693CA2E65C94400BCAAC1 /* SVGKit in Frameworks */,
|
||||
ABE8998E2E533A7100CD7BA6 /* Alamofire in Frameworks */,
|
||||
AB6695272E67015600BCAAC1 /* WaterfallGrid in Frameworks */,
|
||||
ABC150C12E5DB39A00A1F970 /* Lottie in Frameworks */,
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB |
@ -1,13 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6215_3465)">
|
||||
<path d="M9.99984 18.3332C12.301 18.3332 14.3843 17.4004 15.8924 15.8924C17.4004 14.3843 18.3332 12.301 18.3332 9.99984C18.3332 7.69867 17.4004 5.61534 15.8924 4.10728C14.3843 2.59925 12.301 1.6665 9.99984 1.6665C7.69867 1.6665 5.61534 2.59925 4.10728 4.10728C2.59925 5.61534 1.6665 7.69867 1.6665 9.99984C1.6665 12.301 2.59925 14.3843 4.10728 15.8924C5.61534 17.4004 7.69867 18.3332 9.99984 18.3332Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0002 4.5835C10.5755 4.5835 11.0418 5.04987 11.0418 5.62516C11.0418 6.20045 10.5755 6.66683 10.0002 6.66683C9.42487 6.66683 8.9585 6.20045 8.9585 5.62516C8.9585 5.04987 9.42487 4.5835 10.0002 4.5835Z" fill="black"/>
|
||||
<path d="M10.2083 14.1668V8.3335H9.79167H9.375" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8.75 14.1665H11.6667" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6215_3465">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@ -1,12 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6215_3436)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99984 18.3332C14.6022 18.3332 18.3332 14.6022 18.3332 9.99984C18.3332 5.39746 14.6022 1.6665 9.99984 1.6665C5.39746 1.6665 1.6665 5.39746 1.6665 9.99984C1.6665 14.6022 5.39746 18.3332 9.99984 18.3332Z" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.99984 9.58317C11.1504 9.58317 12.0832 8.65042 12.0832 7.49984C12.0832 6.34925 11.1504 5.4165 9.99984 5.4165C8.84925 5.4165 7.9165 6.34925 7.9165 7.49984C7.9165 8.65042 8.84925 9.58317 9.99984 9.58317Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M4.17578 15.9718C4.31899 13.8004 6.12561 12.0835 8.33328 12.0835H11.6666C13.8714 12.0835 15.6762 13.7959 15.8236 15.9632" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6215_3436">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 6.5 MiB |
@ -1,10 +0,0 @@
|
||||
<svg width="358" height="549" viewBox="0 0 358 549" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M358 531V18C358 8.05887 349.941 0 340 0H252.517C246.504 0 240.981 3.31723 238.157 8.62569C235.332 13.9342 229.809 17.2514 223.796 17.2514H124.079C118.428 17.2514 113.335 13.8467 111.174 8.62569C109.013 3.40468 103.919 0 98.2688 0H18C8.05887 0 0 8.05889 0 18V531C0 540.941 8.05887 549 18 549H340C349.941 549 358 540.941 358 531Z" fill="#FFB645"/>
|
||||
<path d="M339 461.5V72C339 62.0589 330.941 54 321 54H96.5552C87.5728 54 79.9652 60.6222 78.7271 69.5189L76.5056 85.4811C75.2675 94.3778 67.6599 101 58.6775 101H37C27.0589 101 19 109.059 19 119V500C19 509.941 27.0589 518 37 518H248.463C254.425 518 260 515.048 263.351 510.117L278.8 487.383C282.151 482.452 287.726 479.5 293.688 479.5H321C330.941 479.5 339 471.441 339 461.5Z" fill="white"/>
|
||||
<path d="M46.2666 88.0056C47.2481 88.0087 48.0853 87.2989 48.2426 86.3304L51.6466 65.3641C51.8439 64.1487 50.9059 63.0431 49.6742 63.0393L44.3504 63.0228C43.3875 63.0198 42.5607 63.7033 42.383 64.6493L38.4445 85.614C38.2135 86.8437 39.1565 87.9835 40.4083 87.9874L46.2666 88.0056Z" fill="black"/>
|
||||
<path d="M32.9979 88.0048C33.971 88.0078 34.8036 87.31 34.9702 86.3516L38.616 65.3861C38.8285 64.1641 37.8882 63.0431 36.6474 63.0392L30.6621 63.0206C29.7089 63.0177 28.8875 63.6878 28.6996 64.6219L24.4812 85.5857C24.2323 86.8226 25.1778 87.9805 26.4401 87.9844L32.9979 88.0048Z" fill="black"/>
|
||||
<path d="M59.9979 88.0048C60.971 88.0078 61.8036 87.31 61.9702 86.3516L65.616 65.3861C65.8285 64.1641 64.8882 63.0431 63.6474 63.0392L57.6621 63.0206C56.7089 63.0177 55.8875 63.6878 55.6996 64.6219L51.4812 85.5857C51.2323 86.8226 52.1778 87.9805 53.4401 87.9844L59.9979 88.0048Z" fill="black"/>
|
||||
<path d="M308.289 518.006C309.271 518.009 310.108 517.299 310.265 516.33L313.669 495.364C313.866 494.149 312.928 493.043 311.697 493.039L306.373 493.023C305.41 493.02 304.583 493.703 304.405 494.649L300.467 515.614C300.236 516.844 301.179 517.984 302.431 517.987L308.289 518.006Z" fill="black"/>
|
||||
<path d="M294.998 518.005C295.971 518.008 296.804 517.31 296.97 516.352L300.616 495.386C300.828 494.164 299.888 493.043 298.647 493.039L292.662 493.021C291.709 493.018 290.888 493.688 290.7 494.622L286.481 515.586C286.232 516.823 287.178 517.98 288.44 517.984L294.998 518.005Z" fill="black"/>
|
||||
<path d="M322.044 518.005C323.017 518.008 323.849 517.31 324.016 516.352L327.662 495.386C327.874 494.164 326.934 493.043 325.693 493.039L319.708 493.021C318.755 493.018 317.933 493.688 317.745 494.622L313.527 515.586C313.278 516.823 314.224 517.98 315.486 517.984L322.044 518.005Z" fill="black"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
@ -1,4 +0,0 @@
|
||||
<svg width="106" height="66" viewBox="0 0 106 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.666667 60C0.666667 62.9455 3.05448 65.3333 6 65.3333C8.94552 65.3333 11.3333 62.9455 11.3333 60C11.3333 57.0545 8.94552 54.6667 6 54.6667C3.05448 54.6667 0.666667 57.0545 0.666667 60ZM22.2802 31.0204L23.152 31.5102L22.2802 31.0204ZM97.5663 30V29H24.0239V30V31H97.5663V30ZM22.2802 31.0204L21.4083 30.5306L5.12816 59.5102L6 60L6.87184 60.4898L23.152 31.5102L22.2802 31.0204ZM24.0239 30V29C22.9395 29 21.9395 29.5852 21.4083 30.5306L22.2802 31.0204L23.152 31.5102C23.3291 31.1951 23.6624 31 24.0239 31V30Z" fill="black"/>
|
||||
<rect x="16.8433" width="89.1566" height="30" rx="15" fill="black"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 705 B |
|
Before Width: | Height: | Size: 134 KiB |
@ -1,5 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.6667 5H3.33333C2.8731 5 2.5 5.3731 2.5 5.83333V16.6667C2.5 17.1269 2.8731 17.5 3.33333 17.5H16.6667C17.1269 17.5 17.5 17.1269 17.5 16.6667V5.83333C17.5 5.3731 17.1269 5 16.6667 5Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M7.479 10.0034H12.479" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2.5 5.41683L5.41667 2.0835H14.5833L17.5 5.41683" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 183 KiB |
@ -1,11 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6596_2873)">
|
||||
<rect x="0.0969238" y="0.567871" width="30.9623" height="30.9623" rx="15.4812" transform="rotate(0.179418 0.0969238 0.567871)" fill="black"/>
|
||||
<path d="M15.578 0.597365L28.9286 23.8893L2.08191 23.8052L15.578 0.597365Z" fill="#D9D9D9"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6596_2873">
|
||||
<rect x="0.0969238" y="0.567871" width="30.9623" height="30.9623" rx="15.4812" transform="rotate(0.179418 0.0969238 0.567871)" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 582 B |
@ -1,45 +0,0 @@
|
||||
<svg width="372" height="504" viewBox="0 0 372 504" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.8" filter="url(#filter0_dddddd_6966_2904)">
|
||||
<path d="M340 427.5V38C340 28.0589 331.941 20 322 20H97.5552C88.5728 20 80.9652 26.6222 79.7271 35.5189L77.5056 51.4811C76.2675 60.3778 68.6599 67 59.6775 67H38C28.0589 67 20 75.0589 20 85V466C20 475.941 28.0589 484 38 484H249.463C255.425 484 261 481.048 264.351 476.117L279.8 453.383C283.151 448.452 288.726 445.5 294.688 445.5H322C331.941 445.5 340 437.441 340 427.5Z" fill="url(#paint0_linear_6966_2904)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_dddddd_6966_2904" x="-11.1789" y="-11.1789" width="382.358" height="526.358" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.371177"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6966_2904"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.742355"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect1_dropShadow_6966_2904" result="effect2_dropShadow_6966_2904"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="2.59824"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect2_dropShadow_6966_2904" result="effect3_dropShadow_6966_2904"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="5.19648"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect3_dropShadow_6966_2904" result="effect4_dropShadow_6966_2904"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="8.90826"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect4_dropShadow_6966_2904" result="effect5_dropShadow_6966_2904"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="15.5894"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect5_dropShadow_6966_2904" result="effect6_dropShadow_6966_2904"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect6_dropShadow_6966_2904" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_6966_2904" x1="240.5" y1="150" x2="16.0608" y2="502.337" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#FFE688"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@ -1,48 +0,0 @@
|
||||
<svg width="384" height="504" viewBox="0 0 384 504" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.8" filter="url(#filter0_dddddd_6966_2902)">
|
||||
<path d="M352 427.5V38C352 28.0589 343.941 20 334 20H109.555C100.573 20 92.9652 26.6222 91.7271 35.5189L89.5056 51.4811C88.2675 60.3778 80.6599 67 71.6775 67H50C40.0589 67 32 75.0589 32 85V466C32 475.941 40.0589 484 50 484H261.463C267.425 484 273 481.048 276.351 476.117L291.8 453.383C295.151 448.452 300.726 445.5 306.688 445.5H334C343.941 445.5 352 437.441 352 427.5Z" fill="url(#paint0_linear_6966_2902)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_dddddd_6966_2902" x="0.821104" y="-11.1789" width="382.358" height="526.358" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.371177"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6966_2902"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.742355"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect1_dropShadow_6966_2902" result="effect2_dropShadow_6966_2902"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="2.59824"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect2_dropShadow_6966_2902" result="effect3_dropShadow_6966_2902"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="5.19648"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect3_dropShadow_6966_2902" result="effect4_dropShadow_6966_2902"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="8.90826"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect4_dropShadow_6966_2902" result="effect5_dropShadow_6966_2902"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="15.5894"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect5_dropShadow_6966_2902" result="effect6_dropShadow_6966_2902"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect6_dropShadow_6966_2902" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_6966_2902" x1="386.214" y1="6.49997" x2="28.9202" y2="503.128" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFEDAA"/>
|
||||
<stop offset="0.293269" stop-color="#FFFBEA"/>
|
||||
<stop offset="0.331731" stop-color="#FFFBED"/>
|
||||
<stop offset="0.600962" stop-color="white"/>
|
||||
<stop offset="1" stop-color="#FDEBA6"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
@ -1,45 +0,0 @@
|
||||
<svg width="372" height="504" viewBox="0 0 372 504" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.8" filter="url(#filter0_dddddd_6966_2903)">
|
||||
<path d="M352 427.5V38C352 28.0589 343.941 20 334 20H109.555C100.573 20 92.9652 26.6222 91.7271 35.5189L89.5056 51.4811C88.2675 60.3778 80.6599 67 71.6775 67H50C40.0589 67 32 75.0589 32 85V466C32 475.941 40.0589 484 50 484H261.463C267.425 484 273 481.048 276.351 476.117L291.8 453.383C295.151 448.452 300.726 445.5 306.688 445.5H334C343.941 445.5 352 437.441 352 427.5Z" fill="url(#paint0_linear_6966_2903)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_dddddd_6966_2903" x="0.821104" y="-11.1789" width="382.358" height="526.358" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.371177"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6966_2903"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="0.742355"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect1_dropShadow_6966_2903" result="effect2_dropShadow_6966_2903"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="2.59824"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect2_dropShadow_6966_2903" result="effect3_dropShadow_6966_2903"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="5.19648"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect3_dropShadow_6966_2903" result="effect4_dropShadow_6966_2903"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="8.90826"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect4_dropShadow_6966_2903" result="effect5_dropShadow_6966_2903"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset/>
|
||||
<feGaussianBlur stdDeviation="15.5894"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
<feBlend mode="normal" in2="effect5_dropShadow_6966_2903" result="effect6_dropShadow_6966_2903"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect6_dropShadow_6966_2903" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_6966_2903" x1="119" y1="382" x2="372.15" y2="-12.5078" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="white"/>
|
||||
<stop offset="1" stop-color="#FFE78E"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
@ -1,19 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<!-- 定义动画 -->
|
||||
<style>
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
.spinner {
|
||||
animation: spin 1s linear infinite;
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- 圆形加载动画 -->
|
||||
<g class="spinner">
|
||||
<circle cx="50" cy="50" r="40" fill="none" stroke="#3498db" stroke-width="8" stroke-dasharray="251.2" stroke-dashoffset="0"/>
|
||||
<circle cx="50" cy="50" r="20" fill="#3498db"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 588 B |
@ -1,5 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.25 2.5H3.75C3.05965 2.5 2.5 3.05965 2.5 3.75V16.25C2.5 16.9404 3.05965 17.5 3.75 17.5H16.25C16.9404 17.5 17.5 16.9404 17.5 16.25V3.75C17.5 3.05965 16.9404 2.5 16.25 2.5Z" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M7.49996 9.58317C8.65054 9.58317 9.58329 8.65042 9.58329 7.49984C9.58329 6.34925 8.65054 5.4165 7.49996 5.4165C6.34938 5.4165 5.41663 6.34925 5.41663 7.49984C5.41663 8.65042 6.34938 9.58317 7.49996 9.58317Z" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17.5 15.0002L12.9167 10.8335L8.75 14.5835L5.83333 12.0835L2.5 14.5835" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 846 B |
@ -1,5 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.6667 9.1665H3.33333C2.8731 9.1665 2.5 9.5396 2.5 9.99984V17.4998C2.5 17.9601 2.8731 18.3332 3.33333 18.3332H16.6667C17.1269 18.3332 17.5 17.9601 17.5 17.4998V9.99984C17.5 9.5396 17.1269 9.1665 16.6667 9.1665Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M5.8335 9.1665V5.83317C5.8335 3.53198 7.699 1.6665 10.0002 1.6665C12.3013 1.6665 14.1668 3.53198 14.1668 5.83317V9.1665" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10 12.5V15" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 716 B |
@ -1,14 +0,0 @@
|
||||
<svg width="274" height="120" viewBox="0 0 274 120" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18 120H256C265.941 120 274 111.941 274 102V60.6067C274 50.6656 265.941 42.6067 256 42.6067H226.773C221.12 42.6067 215.795 39.9507 212.394 35.4346L197.136 15.1722C193.735 10.656 188.41 8 182.757 8H18C8.05887 8 0 16.0589 0 26V102C0 111.941 8.05888 120 18 120Z" fill="#FFB645"/>
|
||||
<rect x="203.396" width="54.9113" height="54.9113" rx="27.4556" transform="rotate(13.0475 203.396 0)" fill="black"/>
|
||||
<path d="M227.444 17.8455L235.272 43.5257L209.119 37.4648L227.444 17.8455Z" fill="#D9D9D9"/>
|
||||
<path d="M13.4714 27.032C13.9079 27.032 14.2938 26.7489 14.4247 26.3326L17.2577 17.3222C17.4603 16.6778 16.9786 16.0216 16.303 16.0216L12.1813 16.0216C11.7444 16.0216 11.3583 16.3052 11.2278 16.7221L8.40683 25.7324C8.20516 26.3766 8.68677 27.0319 9.36191 27.0319L13.4714 27.032Z" fill="black"/>
|
||||
<path d="M52.1379 27.032C52.5744 27.032 52.9603 26.7489 53.0912 26.3326L55.9242 17.3222C56.1269 16.6778 55.6452 16.0216 54.9695 16.0216L50.8478 16.0216C50.4109 16.0216 50.0248 16.3052 49.8943 16.7221L47.0733 25.7324C46.8717 26.3766 47.3533 27.0319 48.0284 27.0319L52.1379 27.032Z" fill="black"/>
|
||||
<path d="M23.1382 27.031C23.5747 27.0311 23.9605 26.748 24.0914 26.3317L26.9245 17.3212C27.1271 16.6768 26.6454 16.0206 25.9697 16.0206L21.8481 16.0206C21.4112 16.0206 21.025 16.3043 20.8945 16.7211L18.0736 25.7315C17.8719 26.3756 18.3535 27.0309 19.0287 27.0309L23.1382 27.031Z" fill="black"/>
|
||||
<path d="M42.4714 27.031C42.9079 27.0311 43.2938 26.748 43.4247 26.3317L46.2577 17.3212C46.4603 16.6768 45.9786 16.0206 45.303 16.0206L41.1813 16.0206C40.7444 16.0206 40.3583 16.3043 40.2278 16.7211L37.4068 25.7315C37.2052 26.3756 37.6868 27.0309 38.3619 27.0309L42.4714 27.031Z" fill="black"/>
|
||||
<path d="M32.8049 27.031C33.2414 27.0311 33.6273 26.748 33.7582 26.3317L36.5912 17.3212C36.7938 16.6768 36.3121 16.0206 35.6365 16.0206L31.5148 16.0206C31.0779 16.0206 30.6918 16.3043 30.5613 16.7211L27.7403 25.7315C27.5387 26.3756 28.0203 27.0309 28.6954 27.0309L32.8049 27.031Z" fill="black"/>
|
||||
<path d="M61.8049 27.031C62.2414 27.0311 62.6273 26.748 62.7582 26.3317L65.5912 17.3212C65.7938 16.6768 65.3121 16.0206 64.6365 16.0206L60.5148 16.0206C60.0779 16.0206 59.6918 16.3043 59.5613 16.7211L56.7403 25.7315C56.5387 26.3756 57.0203 27.0309 57.6954 27.0309L61.8049 27.031Z" fill="black"/>
|
||||
<path d="M252.201 111.98C252.637 111.98 253.023 111.697 253.154 111.281L255.97 102.323C256.173 101.679 255.691 101.023 255.016 101.023L250.924 101.023C250.487 101.023 250.101 101.306 249.97 101.723L247.166 110.681C246.964 111.325 247.446 111.98 248.121 111.98L252.201 111.98Z" fill="black"/>
|
||||
<path d="M242.581 111.98C243.017 111.98 243.403 111.697 243.534 111.281L246.35 102.323C246.553 101.679 246.071 101.023 245.396 101.023L241.304 101.023C240.867 101.023 240.481 101.306 240.35 101.723L237.546 110.681C237.344 111.325 237.826 111.98 238.501 111.98L242.581 111.98Z" fill="black"/>
|
||||
<path d="M261.821 111.98C262.258 111.98 262.644 111.697 262.775 111.281L265.591 102.323C265.794 101.679 265.312 101.023 264.636 101.023L260.545 101.023C260.108 101.023 259.721 101.306 259.591 101.723L256.787 110.681C256.585 111.325 257.066 111.98 257.742 111.98L261.821 111.98Z" fill="black"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
@ -1,4 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.61821 17.9878C6.22192 17.5721 4.97904 16.8003 3.9949 15.7777C4.36204 15.3426 4.58329 14.7804 4.58329 14.1665C4.58329 12.7858 3.46401 11.6665 2.08329 11.6665C1.99977 11.6665 1.91721 11.6706 1.83579 11.6786C1.72487 11.1363 1.66663 10.5749 1.66663 9.99984C1.66663 9.12876 1.80028 8.28888 2.04821 7.49959C2.05988 7.49976 2.07158 7.49984 2.08329 7.49984C3.46401 7.49984 4.58329 6.38055 4.58329 4.99984C4.58329 4.60347 4.49104 4.22867 4.32688 3.89568C5.29058 2.99959 6.46683 2.32897 7.77167 1.96777C8.18513 2.77821 9.02775 3.33319 9.99996 3.33319C10.9722 3.33319 11.8148 2.77821 12.2283 1.96777C13.5331 2.32897 14.7093 2.99959 15.673 3.89568C15.5089 4.22867 15.4166 4.60347 15.4166 4.99984C15.4166 6.38055 16.5359 7.49984 17.9166 7.49984C17.9283 7.49984 17.94 7.49976 17.9517 7.49959C18.1996 8.28888 18.3333 9.12876 18.3333 9.99984C18.3333 10.5749 18.275 11.1363 18.1641 11.6786C18.0827 11.6706 18.0002 11.6665 17.9166 11.6665C16.5359 11.6665 15.4166 12.7858 15.4166 14.1665C15.4166 14.7804 15.6379 15.3426 16.005 15.7777C15.0209 16.8003 13.778 17.5721 12.3817 17.9878C12.0595 16.9798 11.115 16.2498 9.99996 16.2498C8.88496 16.2498 7.94046 16.9798 7.61821 17.9878Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M10 12.9168C11.6109 12.9168 12.9167 11.611 12.9167 10.0002C12.9167 8.38933 11.6109 7.0835 10 7.0835C8.38921 7.0835 7.08337 8.38933 7.08337 10.0002C7.08337 11.611 8.38921 12.9168 10 12.9168Z" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
@ -1,12 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_6215_3454)">
|
||||
<path d="M15 13.3332C16.841 13.3332 18.3333 11.8408 18.3333 9.99984C18.3333 8.15888 16.841 6.6665 15 6.6665" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M4.99984 6.6665C3.15889 6.6665 1.6665 8.15888 1.6665 9.99984C1.6665 11.8408 3.15889 13.3332 4.99984 13.3332" stroke="black" stroke-width="1.66667" stroke-linejoin="round"/>
|
||||
<path d="M5 13.3332V13.1248V12.0832V9.99984V6.6665C5 3.90508 7.23858 1.6665 10 1.6665C12.7614 1.6665 15 3.90508 15 6.6665V13.3332C15 16.0946 12.7614 18.3332 10 18.3332" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_6215_3454">
|
||||
<rect width="20" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 860 B |
@ -1,11 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7357_2809)">
|
||||
<path d="M3.33325 12.6668V6.00016C3.33325 3.42283 5.42259 1.3335 7.99992 1.3335C10.5773 1.3335 12.6666 3.42283 12.6666 6.00016V12.6668M1.33325 12.6668H14.6666" stroke="black" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M7.99992 14.6665C8.92039 14.6665 9.66659 13.9203 9.66659 12.9998V12.6665H6.33325V12.9998C6.33325 13.9203 7.07945 14.6665 7.99992 14.6665Z" stroke="black" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7357_2809">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 731 B |
@ -1,10 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_7079_2856" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="20" height="20">
|
||||
<path d="M20 0H0V20H20V0Z" fill="black"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_7079_2856)">
|
||||
<path d="M2.5 10.0035V17.5H17.5V10" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M13.75 6.25L10 2.5L6.25 6.25" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M9.99658 13.3333V2.5" stroke="black" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 672 B |
@ -1,5 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.97485 5.97461H19.9748" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3.97485 11.9746H19.9748" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3.97485 17.9746H19.9748" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 451 B |
@ -1,148 +1,16 @@
|
||||
import SwiftUI
|
||||
import SVGKit
|
||||
|
||||
struct SVGImage: UIViewRepresentable {
|
||||
// Deprecated: SVG runtime rendering removed. This view is a no-op placeholder to keep API compatibility.
|
||||
struct SVGImage: View {
|
||||
let svgName: String
|
||||
var contentMode: ContentMode = .fit
|
||||
var tintColor: Color?
|
||||
|
||||
private var svgPath: String {
|
||||
return svgName
|
||||
var body: some View {
|
||||
Color.clear
|
||||
}
|
||||
|
||||
private func createImageView() -> SVGKFastImageView {
|
||||
let emptySVGString = """
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 1" preserveAspectRatio="xMidYMid meet">
|
||||
<rect width="1" height="1" fill="transparent"/>
|
||||
</svg>
|
||||
"""
|
||||
|
||||
if let data = emptySVGString.data(using: .utf8),
|
||||
let svgImage = SVGKImage(data: data) {
|
||||
let imageView = SVGKFastImageView(svgkImage: svgImage) ?? SVGKFastImageView()
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.backgroundColor = .clear
|
||||
return imageView
|
||||
}
|
||||
|
||||
let fallbackView = SVGKFastImageView()
|
||||
fallbackView.backgroundColor = .clear
|
||||
return fallbackView
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> SVGKFastImageView {
|
||||
print("🔄 开始加载SVG: \(svgName)")
|
||||
let imageView = createImageView()
|
||||
loadSVG(into: imageView)
|
||||
configureView(imageView)
|
||||
return imageView
|
||||
}
|
||||
|
||||
private func loadSVG(into imageView: SVGKFastImageView) {
|
||||
guard let path = Bundle.main.path(forResource: svgPath, ofType: "svg") else {
|
||||
print("⚠️ 在main bundle中找不到文件: \(svgPath).svg")
|
||||
return
|
||||
}
|
||||
|
||||
let url = URL(fileURLWithPath: path)
|
||||
guard let svgImage = SVGKImage(contentsOf: url) else {
|
||||
print("❌ 无法从URL创建SVG: \(path)")
|
||||
return
|
||||
}
|
||||
|
||||
// 设置SVG的尺寸为容器大小
|
||||
let containerSize = imageView.bounds.size
|
||||
if containerSize != .zero {
|
||||
svgImage.size = containerSize
|
||||
} else {
|
||||
// 如果容器大小未知,设置一个默认大小
|
||||
svgImage.size = CGSize(width: 100, height: 100)
|
||||
}
|
||||
|
||||
print("✅ 成功加载SVG: \(svgName), 尺寸: \(svgImage.size)")
|
||||
|
||||
DispatchQueue.main.async {
|
||||
imageView.image = svgImage
|
||||
imageView.setNeedsLayout()
|
||||
imageView.layoutIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
private func configureView(_ imageView: SVGKFastImageView) {
|
||||
imageView.contentMode = contentMode == .fit ? .scaleAspectFit : .scaleAspectFill
|
||||
imageView.clipsToBounds = true
|
||||
imageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
imageView.backgroundColor = .clear
|
||||
|
||||
// 确保图片视图可以正确缩放
|
||||
imageView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
|
||||
if let tintColor = tintColor?.uiColor {
|
||||
imageView.tintColor = tintColor
|
||||
DispatchQueue.main.async {
|
||||
self.applyTintColor(tintColor, to: imageView.layer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func applyTintColor(_ color: UIColor, to layer: CALayer) {
|
||||
if let shapeLayer = layer as? CAShapeLayer {
|
||||
shapeLayer.fillColor = color.cgColor
|
||||
}
|
||||
|
||||
layer.sublayers?.forEach { sublayer in
|
||||
applyTintColor(color, to: sublayer)
|
||||
}
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: SVGKFastImageView, context: Context) {
|
||||
loadSVG(into: uiView)
|
||||
|
||||
if let tintColor = tintColor?.uiColor {
|
||||
uiView.tintColor = tintColor
|
||||
DispatchQueue.main.async {
|
||||
self.applyTintColor(tintColor, to: uiView.layer)
|
||||
}
|
||||
}
|
||||
|
||||
uiView.contentMode = contentMode == .fit ? .scaleAspectFit : .scaleAspectFill
|
||||
}
|
||||
|
||||
func sizeThatFits(_ proposal: ProposedViewSize, uiView: SVGKFastImageView, context: Context) -> CGSize? {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - ContentMode
|
||||
extension SVGImage {
|
||||
enum ContentMode {
|
||||
case fit // 保持宽高比,适应容器
|
||||
case fill // 保持宽高比,填充容器(可能被裁剪)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Preview
|
||||
#Preview {
|
||||
VStack(spacing: 20) {
|
||||
Text("IP SVG")
|
||||
SVGImage(svgName: "IP")
|
||||
.frame(width: 100, height: 100)
|
||||
.background(Color.gray.opacity(0.2))
|
||||
.border(Color.red, width: 1)
|
||||
|
||||
Text("Pioneer SVG")
|
||||
SVGImage(svgName: "Pioneer", contentMode: .fill)
|
||||
.frame(width: 100, height: 50)
|
||||
.background(Color.gray.opacity(0.2))
|
||||
.border(Color.blue, width: 1)
|
||||
.clipped()
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
// MARK: - Color Extension
|
||||
private extension Color {
|
||||
var uiColor: UIColor {
|
||||
return UIColor(self)
|
||||
case fit
|
||||
case fill
|
||||
}
|
||||
}
|
||||
@ -1,71 +1,8 @@
|
||||
import SwiftUI
|
||||
import WebKit
|
||||
|
||||
struct SVGImageHtml: UIViewRepresentable {
|
||||
// Deprecated: SVG runtime rendering removed. This view is a no-op placeholder.
|
||||
struct SVGImageHtml: View {
|
||||
let svgName: String
|
||||
|
||||
func makeUIView(context: Context) -> WKWebView {
|
||||
let webView = WKWebView()
|
||||
webView.isOpaque = false
|
||||
webView.backgroundColor = .clear
|
||||
webView.scrollView.isScrollEnabled = false
|
||||
webView.scrollView.contentInsetAdjustmentBehavior = .never
|
||||
|
||||
// 1. Get the URL for the SVG file
|
||||
guard let path = Bundle.main.path(forResource: svgName, ofType: "svg") else {
|
||||
print("❌ Cannot find SVG file: \(svgName).svg in bundle")
|
||||
return webView
|
||||
}
|
||||
|
||||
let fileURL = URL(fileURLWithPath: path)
|
||||
|
||||
do {
|
||||
// 2. Read the SVG content directly
|
||||
let svgString = try String(contentsOf: fileURL, encoding: .utf8)
|
||||
|
||||
// 3. Create HTML with inline SVG for better reliability
|
||||
let htmlString = """
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<style>
|
||||
body, html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
svg {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
\(svgString)
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
// 4. Load the HTML with base URL as the main bundle's resource path
|
||||
if let resourcePath = Bundle.main.resourceURL {
|
||||
webView.loadHTMLString(htmlString, baseURL: resourcePath)
|
||||
} else {
|
||||
webView.loadHTMLString(htmlString, baseURL: nil)
|
||||
}
|
||||
|
||||
} catch {
|
||||
print("❌ Error loading SVG file: \(error.localizedDescription)")
|
||||
}
|
||||
|
||||
return webView
|
||||
var body: some View {
|
||||
Color.clear
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: WKWebView, context: Context) {}
|
||||
}
|
||||