提交 | 用户 | 时间
|
314507
|
1 |
<template> |
H |
2 |
<div class="flex flex-row flex-wrap"> |
|
3 |
<div |
|
4 |
v-for="(item, index) in property.list" |
|
5 |
:key="index" |
|
6 |
class="relative flex flex-col items-center p-b-14px p-t-20px" |
|
7 |
:style="{ width: `${100 * (1 / property.column)}%` }" |
|
8 |
> |
|
9 |
<!-- 右上角角标 --> |
|
10 |
<span |
|
11 |
v-if="item.badge?.show" |
|
12 |
class="absolute left-50% top-10px z-1 h-20px rounded-50% p-x-6px text-center text-12px leading-20px" |
|
13 |
:style="{ color: item.badge.textColor, backgroundColor: item.badge.bgColor }" |
|
14 |
> |
|
15 |
{{ item.badge.text }} |
|
16 |
</span> |
|
17 |
<el-image v-if="item.iconUrl" class="h-28px w-28px" :src="item.iconUrl" /> |
|
18 |
<span class="m-t-8px h-16px text-12px leading-16px" :style="{ color: item.titleColor }"> |
|
19 |
{{ item.title }} |
|
20 |
</span> |
|
21 |
<span class="m-t-6px h-12px text-10px leading-12px" :style="{ color: item.subtitleColor }"> |
|
22 |
{{ item.subtitle }} |
|
23 |
</span> |
|
24 |
</div> |
|
25 |
</div> |
|
26 |
</template> |
|
27 |
|
|
28 |
<script setup lang="ts"> |
|
29 |
import { MenuGridProperty } from './config' |
|
30 |
/** 宫格导航 */ |
|
31 |
defineOptions({ name: 'MenuGrid' }) |
|
32 |
defineProps<{ property: MenuGridProperty }>() |
|
33 |
</script> |
|
34 |
|
|
35 |
<style scoped lang="scss"></style> |