chore: 🔨 本地 SVG 加载方式由 vite-plugin-svg-icons 切换为 @unocss/preset-icons

This commit is contained in:
Ray.Hao
2025-02-07 23:57:57 +08:00
parent e041c5575c
commit dd275dae27
23 changed files with 111 additions and 118 deletions

View File

@@ -7,7 +7,7 @@
<copy-button :text="generateIconCode(item)">
<el-tooltip effect="dark" :content="generateIconCode(item)" placement="top">
<div class="icon-item">
<svg-icon :icon-class="item" />
<div :class="`i-svg:${item}`" />
<span>{{ item }}</span>
</div>
</el-tooltip>
@@ -36,7 +36,6 @@
</template>
<script setup lang="ts">
import SvgIcon from "@/components/SvgIcon/index.vue";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
defineOptions({
@@ -87,7 +86,7 @@ const svg_icons: string[] = [
const icons = ref(ElementPlusIconsVue);
function generateIconCode(symbol: any) {
return `<svg-icon icon-class="${symbol}" />`;
return `<div class="i-svg:${symbol}" />`;
}
function generateElementIconCode(symbol: any) {