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

10
src/stores/useTabbar.ts Normal file
View File

@ -0,0 +1,10 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useTabbar = defineStore('tabbar', () => {
const activeTab = ref('home')
return {
activeTab
}
})

11
src/stores/useUser.ts Normal file
View File

@ -0,0 +1,11 @@
import type { User } from "@/types/api/user";
import { defineStore } from "pinia";
import { ref } from "vue";
export const useUser = defineStore("user", () => {
const userinfo = ref<User | null>(null);
return {
userinfo,
};
});

View File

@ -1,10 +0,0 @@
import { defineStore } from "pinia";
import { ref } from "vue";
export const useUserStore = defineStore("user", () => {
const count = ref(0);
return {
count,
};
});