From 089bf5d2378b3c4a61d795b2a92bede2c193b771 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Tue, 06 Jan 2026 11:22:58 +0800
Subject: [PATCH] 1

---
 src/components/icon-svg/index.vue |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/src/components/icon-svg/index.vue b/src/components/icon-svg/index.vue
new file mode 100644
index 0000000..8b06d59
--- /dev/null
+++ b/src/components/icon-svg/index.vue
@@ -0,0 +1,51 @@
+<template>
+  <svg
+    :class="getClassName"
+    :width="width"
+    :height="height"
+    aria-hidden="true">
+    <use :xlink:href="getName"></use>
+  </svg>
+</template>
+
+<script>
+  export default {
+    name: 'icon-svg',
+    props: {
+      name: {
+        type: String,
+        required: true
+      },
+      className: {
+        type: String
+      },
+      width: {
+        type: String
+      },
+      height: {
+        type: String
+      }
+    },
+    computed: {
+      getName () {
+        return `#icon-${this.name}`
+      },
+      getClassName () {
+        return [
+          'icon-svg',
+          `icon-svg__${this.name}`,
+          this.className && /\S/.test(this.className) ? `${this.className}` : ''
+        ]
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .icon-svg {
+    width: 1em;
+    height: 1em;
+    fill: currentColor;
+    overflow: hidden;
+  }
+</style>

--
Gitblit v1.9.3