add member page & tabbar item

This commit is contained in:
Dawn_Ocean
2024-03-11 19:22:51 +08:00
parent 2920059ffa
commit afdedea344
10 changed files with 144 additions and 46 deletions
+23
View File
@@ -0,0 +1,23 @@
import { View, Text } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro';
import type CustomTabBar from '../../custom-tab-bar';
import './member.scss';
export default class MemberPage extends Component {
// 以下是TabBar相关
pageCtx = Taro.getCurrentInstance().page;
componentDidShow() {
const tabbar = Taro.getTabBar<CustomTabBar>(this.pageCtx);
tabbar?.setSelected(2);
}
// 以上是TabBar相关
render(): ReactNode {
return (
<View>
<Text>Member Page</Text>
</View>
);
}
}