Skip to content

Commit 111ca58

Browse files
committed
chore: Refactor index.vue to improve menu rendering
1 parent 3d04a1a commit 111ca58

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

src/pages/index.vue

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
<template lang="pug">
2-
q-page.container
3-
div.q-pa-md(v-for="part in menuParts", :key="part")
4-
q-separator.q-my-sm-md
5-
div.text-h5.q-my-md {{ part }}
2+
q-page.q-px-md(style="margin: auto; max-width: 1366px;")
3+
.column.no-wrap
4+
div(v-for="(part, i) in menuParts", :key="part")
5+
q-bar.q-pa-lg.q-mb-sm.transparent(dense)
6+
.text-h5 {{ part }}
67

7-
div.row.q-gutter-md
8-
q-btn(v-for="item in getMenuByPart(part)" :key="item.label"
9-
tile :color="item.color"
10-
class="col-xs-12 col-sm-6 col-md-6 col-lg-4"
11-
:label="item.label"
12-
@click="push(item.path)"
13-
:icon="item.icon"
14-
style="height: 60px; font-size: 18px; width:20%;" )
15-
q-badge(v-if="item.badgeValue" :color="item.badge.color" floating) {{ item.badge.value }}
16-
//- span(v-for="item in getMenuByPart(part)" :key="item.label") {{ item }}
8+
.row.q-col-gutter-md
9+
div.col(
10+
v-for="item in getMenuByPart(part)" :key="item.label"
11+
class="col-12 col-sm-6 col-md-6 col-lg-4"
12+
)
13+
q-btn.q-py-md.fit(
14+
:color="item.color"
15+
:label="item.label"
16+
@click="push(item.path)"
17+
:icon="item.icon"
18+
style="font-size: 18px;"
19+
tile
20+
)
21+
q-badge(v-if="item.badgeValue" :color="item.badge.color" floating v-text="item?.badge?.value")
22+
q-separator.q-mt-md.q-mb-sm(v-if="i < menuParts.length - 1")
1723
</template>
1824

1925
<script lang="ts" setup>

0 commit comments

Comments
 (0)