-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.vue
60 lines (56 loc) · 1.22 KB
/
App.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<div class="pt-safe-area-inset-top">
<h3 class="text-center text-32px text-red">Vue3 Capacitor</h3>
<p class="text-4xl text-green-700 text-center py-20">
<span>Hello</span>
<a
class="text-pink-600 hover:font-bold hover:border-1"
href="https://antfu.me/posts/reimagine-atomic-css"
target="atomic-css"
>
Atomic CSS
</a>
<span>!</span>
</p>
<Tabbar :bottom="true" :safe-area-inset-bottom="true">
<TabbarItem v-for="item in tabbarConfig" :key="item.key" :tab-title="item.title" :icon="item.icon" />
</Tabbar>
</div>
</template>
<script setup lang="ts">
import { Tabbar, TabbarItem } from '@nutui/nutui';
type TabbarKey = 'home' | 'category' | 'find' | 'cart' | 'my';
interface TabbarConfig {
key: TabbarKey;
title: string;
icon: TabbarKey;
}
const tabbarConfig: TabbarConfig[] = [
{
key: 'home',
title: '首页',
icon: 'home'
},
{
key: 'category',
title: '分类',
icon: 'category'
},
{
key: 'find',
title: '发现',
icon: 'find'
},
{
key: 'cart',
title: '购物车',
icon: 'cart'
},
{
key: 'my',
title: '我的',
icon: 'my'
}
];
</script>
<style scoped></style>