Files

60 lines
908 B
Vue
Raw Permalink Normal View History

<script setup>
2026-07-16 16:42:45 +08:00
import {
ArrowLeft,
ArrowRight,
Bottom,
Check,
Close,
Location,
Menu,
Message,
Phone,
Picture,
2026-07-16 16:42:45 +08:00
Plus,
Promotion,
Search,
Service
2026-07-16 16:42:45 +08:00
} from '@element-plus/icons-vue'
const props = defineProps({
name: {
type: String,
default: 'arrow-right'
}
})
const icons = {
'arrow-left': ArrowLeft,
'arrow-right': ArrowRight,
bottom: Bottom,
check: Check,
close: Close,
location: Location,
menu: Menu,
message: Message,
phone: Phone,
picture: Picture,
2026-07-16 16:42:45 +08:00
plus: Plus,
promotion: Promotion,
search: Search,
service: Service
2026-07-16 16:42:45 +08:00
}
const icon = computed(() => icons[props.name] || ArrowRight)
</script>
<template>
<component :is="icon" class="app-icon" aria-hidden="true" />
</template>
<style scoped>
.app-icon {
width: 1em;
height: 1em;
display: inline-block;
flex: 0 0 auto;
overflow: visible;
vertical-align: -0.12em;
}
</style>