feat: 项目加载优化
This commit is contained in:
33
Yi.Ai.Vue3/src/components/FontAwesomeIcon/index.vue
Normal file
33
Yi.Ai.Vue3/src/components/FontAwesomeIcon/index.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
|
||||
interface Props {
|
||||
/** FontAwesome 图标名称(不含 fa- 前缀) */
|
||||
icon: string;
|
||||
/** 图标大小 */
|
||||
size?: 'xs' | 'sm' | 'lg' | 'xl' | '2x' | '3x' | '4x' | '5x';
|
||||
/** 旋转动画 */
|
||||
spin?: boolean;
|
||||
/** 脉冲动画 */
|
||||
pulse?: boolean;
|
||||
/** 旋转角度 */
|
||||
rotation?: 0 | 90 | 180 | 270;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
size: undefined,
|
||||
spin: false,
|
||||
pulse: false,
|
||||
rotation: undefined,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<FontAwesomeIcon
|
||||
:icon="`fa-solid fa-${icon}`"
|
||||
:size="size"
|
||||
:spin="spin"
|
||||
:pulse="pulse"
|
||||
:rotation="rotation"
|
||||
/>
|
||||
</template>
|
||||
Reference in New Issue
Block a user