🎈 perf(购物页面): 添加分页功能]
This commit is contained in:
+13
-6
@@ -13,33 +13,40 @@ type TabBarIndexMap = {
|
||||
}
|
||||
}
|
||||
|
||||
export enum TabBarIndex {
|
||||
INDEX = 1,
|
||||
SHOPPING = 2,
|
||||
ORDER = 3,
|
||||
USER = 4
|
||||
}
|
||||
|
||||
|
||||
const INITIAL_STATE = {
|
||||
selectedId: 1,
|
||||
selectedId: TabBarIndex.INDEX,
|
||||
tabItem: [
|
||||
{
|
||||
id: 1,
|
||||
id: TabBarIndex.INDEX,
|
||||
pagePath: '/pages/index/index',
|
||||
text: '首页',
|
||||
iconPath: 'icon-shouye1',
|
||||
selectedIconPath: 'icon-shouye',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
id: TabBarIndex.SHOPPING,
|
||||
pagePath: '/pages/shopping/index',
|
||||
text: '购物',
|
||||
iconPath: 'icon-gouwu1',
|
||||
selectedIconPath: 'icon-gouwu',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
id: TabBarIndex.ORDER,
|
||||
pagePath: '/pages/order/index',
|
||||
text: '订单',
|
||||
iconPath: 'icon-dingdan1',
|
||||
selectedIconPath: 'icon-dingdan',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
id: TabBarIndex.USER,
|
||||
pagePath: '/pages/user/index',
|
||||
text: '我的',
|
||||
iconPath: 'icon-gerenzhongxin1',
|
||||
@@ -50,7 +57,7 @@ const INITIAL_STATE = {
|
||||
|
||||
export type TabBarData = {
|
||||
selectedId: number
|
||||
tabItem: TabBarIndexMap[number][]
|
||||
tabItem?: TabBarIndexMap[number][]
|
||||
}
|
||||
|
||||
export type TabBarAction = {
|
||||
|
||||
Reference in New Issue
Block a user