修复:修复引入Arco Design Vue打包报错的问题(引入图标组件打包就会报错,改为引入对应svg图标)
This commit is contained in:
@@ -10,10 +10,13 @@
|
||||
:label="formatDate(article.date)"
|
||||
>
|
||||
<template #dot>
|
||||
<IconBug :style="{color: '#f53f3f'}" v-if="article.categories.includes('Bug万象集')" />
|
||||
<IconBulb :style="{color: '#ff7d00'}" v-else-if="article.categories.includes('杂碎逆袭史')" />
|
||||
<IconCode v-else-if="article.categories.includes('方案春秋志')" />
|
||||
<IconBookmark :style="{color: '#00b42a'}" v-else />
|
||||
<svg v-if="article.categories.includes('Bug万象集')" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" class="arco-icon arco-icon-bug" stroke-width="4" stroke-linecap="butt" stroke-linejoin="miter" data-v-8ed9eb22="" style="color: #f53f3f;"><path d="M24 42c-6.075 0-11-4.925-11-11V18h22v13c0 6.075-4.925 11-11 11Zm0 0V23m11 4h8M5 27h8M7 14a4 4 0 0 0 4 4h26a4 4 0 0 0 4-4m0 28v-.5a6.5 6.5 0 0 0-6.5-6.5M7 42v-.5a6.5 6.5 0 0 1 6.5-6.5M17 14a7 7 0 1 1 14 0"></path></svg>
|
||||
|
||||
<svg v-else-if="article.categories.includes('杂碎逆袭史')" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" class="arco-icon arco-icon-bulb" stroke-width="4" stroke-linecap="butt" stroke-linejoin="miter" data-v-8ed9eb22="" style="color: #ff7d00;"><path d="M17 42h14m6-24c0 2.823-.9 5.437-2.43 7.568-1.539 2.147-3.185 4.32-3.77 6.897l-.623 2.756A1 1 0 0 1 29.2 36H18.8a1 1 0 0 1-.976-.779l-.624-2.756c-.584-2.576-2.23-4.75-3.77-6.897A12.94 12.94 0 0 1 11 18c0-7.18 5.82-13 13-13s13 5.82 13 13Z"></path></svg>
|
||||
|
||||
<svg v-else-if="article.categories.includes('方案春秋志')" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor" class="arco-icon arco-icon-code" stroke-width="4" stroke-linecap="butt" stroke-linejoin="miter" data-v-8ed9eb22=""><path d="M16.734 12.686 5.42 24l11.314 11.314m14.521-22.628L42.57 24 31.255 35.314M27.2 6.28l-6.251 35.453"></path></svg>
|
||||
|
||||
<svg v-else viewBox="0 0 48 48" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" class="arco-icon arco-icon-bookmark" stroke-width="4" stroke-linecap="butt" stroke-linejoin="miter" data-v-8ed9eb22="" style="color: #00b42a;"><path d="M16 16h16M16 24h8"></path><path d="M24 41H8V6h32v17"></path><path d="M30 29h11v13l-5.5-3.5L30 42V29Z"></path></svg>
|
||||
</template>
|
||||
<a :href="article.path" class="title" target="_blank">{{ article.title }}</a>
|
||||
</a-timeline-item>
|
||||
@@ -23,9 +26,9 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { IconBug, IconBulb, IconCode, IconBookmark } from '@arco-design/web-vue/es/icon'
|
||||
import articleData from '../../../../article-data.json'
|
||||
import { formatDate } from '../utils.ts'
|
||||
import { IconBug, IconBulb, IconCode, IconBookmark } from '@arco-design/web-vue/es/icon'
|
||||
|
||||
const articles = computed(() => articleData.sort((a, b) => a.date.localeCompare(b.date)))
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user