feat(projects): refactor icon system, unify icon usage [重构图标系统,统一图标用法]

This commit is contained in:
Soybean
2022-09-23 00:15:00 +08:00
parent fe8cab3d1c
commit 811f820644
47 changed files with 270 additions and 156 deletions

View File

@@ -4,7 +4,7 @@
<gradient-bg class="h-100px" :start-color="item.colors[0]" :end-color="item.colors[1]">
<h3 class="text-16px">{{ item.title }}</h3>
<div class="flex justify-between pt-12px">
<Icon :icon="item.icon" class="text-32px" />
<svg-icon :icon="item.icon" class="text-32px" />
<count-to
:prefix="item.unit"
:start-value="1"
@@ -18,7 +18,6 @@
</template>
<script setup lang="ts">
import { Icon } from '@iconify/vue';
import { GradientBg } from './components';
defineOptions({ name: 'DashboardAnalysisDataCard' });

View File

@@ -2,7 +2,7 @@
<n-card :bordered="false" class="rounded-16px shadow-sm">
<div class="flex-y-center justify-between">
<div class="flex-y-center">
<icon-custom-avatar class="text-70px" />
<icon-local-avatar class="text-70px" />
<div class="pl-12px">
<h3 class="text-18px font-semibold">早安{{ auth.userInfo.userName }}, 今天又是充满活力的一天</h3>
<p class="leading-30px text-[#999]">今日多云转晴20 - 25</p>

View File

@@ -2,14 +2,12 @@
<div
class="flex-col-center p-12px border-1px border-[#efeff5] dark:border-[#ffffff17] rounded-4px hover:shadow-sm cursor-pointer"
>
<Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" />
<svg-icon :icon="icon" :style="{ color: iconColor }" class="text-30px" />
<p class="py-8px text-16px">{{ label }}</p>
</div>
</template>
<script setup lang="ts">
import { Icon } from '@iconify/vue';
defineOptions({ name: 'DashboardWorkbenchMainShortcutsCard' });
interface Props {

View File

@@ -4,7 +4,7 @@
@click="handleOpenSite"
>
<header class="flex-y-center">
<Icon :icon="icon" :style="{ color: iconColor }" class="text-30px" />
<svg-icon :icon="icon" :style="{ color: iconColor }" class="text-30px" />
<h3 class="pl-12px text-18px font-semibold">{{ name }}</h3>
</header>
<p class="py-8px h-56px text-[#999]">{{ description }}</p>
@@ -15,8 +15,6 @@
</template>
<script setup lang="ts">
import { Icon } from '@iconify/vue';
defineOptions({ name: 'DashboardWorkbenchMainTechnologyCard' });
interface Props {

View File

@@ -19,7 +19,7 @@
<n-list>
<n-list-item v-for="item in activity" :key="item.id">
<template #prefix>
<icon-custom-avatar class="text-48px" />
<icon-local-avatar class="text-48px" />
</template>
<n-thing :title="item.content" :description="item.time" />
</n-list-item>
@@ -37,7 +37,7 @@
</n-grid>
</n-card>
<n-card title="创意" :bordered="false" size="small" class="shadow-sm rounded-16px">
<icon-custom-banner class="text-400px text-primary" />
<icon-local-banner class="text-400px text-primary" />
</n-card>
</n-space>
</n-grid-item>