feat: 添加pinia状态管理库和Tabbar组件

- 添加pinia状态管理库和Tabbar组件
- 导入新的组件和模块
- 更新页面布局和样式
- 删除无用的文件和代码
This commit is contained in:
2024-09-18 22:08:19 +08:00
parent 34222f94d8
commit cf77c72dfe
15 changed files with 216 additions and 49 deletions

View File

@ -1,30 +1,18 @@
<template>
<div class="content">
<img class="logo" src="/static/logo.png" />
<div class="flex flex-col items-center gap-4">
<p class="title text-red-500">
{{ title }}
</p>
<WdButton @click="onClick">Increment</WdButton>
<Tabbar current-name="home" />
<page-wrapper>
<div class="content">
<img class="logo" src="/static/logo.png" />
<div class="flex flex-col items-center gap-4">
<p class="title text-red-500">
Welcome
</p>
</div>
</div>
</div>
</page-wrapper>
</template>
<script setup lang="ts">
import { useUserStore } from '@/stores/user';
import { computed } from 'vue';
import Tabbar from '@/components/Tabbar.vue';
const user = useUserStore()
const onClick = () => {
user.count++
}
const title = computed(() => `Counter: ${user.count}`)
import pageWrapper from '@/components/page-wrapper.vue';
</script>
<style>