feat:小程序自定义tabbar

This commit is contained in:
dzc committed 2026-03-13 16:40:18 +08:00
1 parent 4b1e41b550
commit 11fb30e17d
158 files changed
+47290 -27243

No files matched your search

+11 -2
View File
@@ -6,9 +6,12 @@ import { router } from "@@/index"
import { noticeApi, appApi } from "@@/api/index"
import { getAppInfo } from "@@/utils/app"
import { filePath } from "@@/utils/file"
import { useTabbarStore } from "@@/stores/tabbar"
import Empty from "@@/components/empty/empty.vue"
const tabbarStore = useTabbarStore()
const state = reactive<any>({
swiperList: [
{
@@ -44,6 +47,12 @@ onShow(() => {
onHide(() => {
})
const doMenu = async (v: any) => {
console.log("tabbarStore:", tabbarStore);
await tabbarStore.componetTabbarList(v.page)
tabbarStore.jumpFirstTabbar()
}
// 获取通知公告列表
const getNoticeList = async () => {
try {
@@ -128,8 +137,8 @@ const getAppMenuList = async () => {
<view class="w-full h-50rpx" />
<view v-if="state?.appMenuList?.length > 0">
<view class="grid grid-cols-3 h-full items-center gap-y-30rpx p-y-30rpx">
<view class="flex flex-col items-center justify-center" v-for="(v, i) in state.appMenuList"
:key="i">
<view class="flex flex-col items-center justify-center" v-for="(v, i) in state.appMenuList" :key="i"
@tap="doMenu(v)">
<view class="flex-col-center">
<image class="size-100rpx" :src="filePath(v.icon)" mode="aspectFill" />
<view class="m-t-10rpx sub-text-26">{{ v.title }}</view>