feat: 添加pinia状态管理库和Tabbar组件
- 添加pinia状态管理库和Tabbar组件 - 导入新的组件和模块 - 更新页面布局和样式 - 删除无用的文件和代码
This commit is contained in:
10
src/stores/useTabbar.ts
Normal file
10
src/stores/useTabbar.ts
Normal 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
11
src/stores/useUser.ts
Normal 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,
|
||||
};
|
||||
});
|
@ -1,10 +0,0 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { ref } from "vue";
|
||||
|
||||
export const useUserStore = defineStore("user", () => {
|
||||
const count = ref(0);
|
||||
|
||||
return {
|
||||
count,
|
||||
};
|
||||
});
|
Reference in New Issue
Block a user